This guide discusses how to configure plugins to load at startup using C/C++.

## Solution

Rhino will load plugins in two ways:

1. When Needed (Default). Plugin will not be loaded when Rhino starts. Plugin will be loaded when a plugin defined command is run, when a user selects a plugin defined file import/export type, or if a 3DM file has user data that was created by your plugin.
2. At Startup. Plugin is loaded when Rhino is loaded and initialized.

To set your plugin to load on startup, you need to override your plugin object’s CRhinoPlugIn::PlugInLoadTime() virtual function and return the CRhinoPlugIn::load_plugin_at_startup enumerated value. See rhinoSdkPlugIn.h for details.

## Sample

// Description:
//    Called by Rhino when writing plug-in information to the registry.  This
//    information will be read the next time Rhino starts to identify properly
//    installed plug-ins.
{
}


## Details

If you have already loaded your plugin using Rhino’s plugin manager, when debugging for example, then you will need to either remove your plugin’s registry key, which can be found here:

HKEY_LOCAL_MACHINE\SOFTWARE\McNeel\Rhinoceros\<version>\<rhino_build_date>\Plug-Ins\<your_plugin_guid>


#### WARNING

if you are running on a system with limited rights, with user-account control enabled for example, then there will be a corresponding key in HKEY_CURRENT_USER

Or, you can just modify your plugin’s “LoadMode” registry key value. The available values for this key are as follows: