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 PlugInLoadTime virtual function and return the load_plugin_at_startup enumerated value.

## Sample

CRhinoPlugIn::plugin_load_time PlugInLoadTime()
{
}


## 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: