Registry Location/Setting For Plugins To Load

I would like to make two .reg files. One of them to tell Rhino not to load X,Y, and Z plugins and another to tell it to load X,Y, and Z again. That way I could run a quick command before debugging and get Rhino to load faster.

I can see the plugins list in:

HKEY_LOCAL_MACHINE\SOFTWARE\McNeel\Rhinoceros\5.0x64\Plug-ins\

But I cannot see any flag that determines if it loads or not. On the other hand I notice that plugins which do NOT load are listed here:

HKEY_CURRENT_USER\Software\McNeel\Rhinoceros\5.0x64\Global Options\Plug-ins\

Before I muck around in the registry and get myself in trouble, could you verify these two .reg snippets?

Unload:

[HKEY_CURRENT_USER\Software\McNeel\Rhinoceros\5.0x64\Global Options\Plug-ins\ <X Guid> ]
"LoadProtection"="2"

Load:

[-HKEY_CURRENT_USER\Software\McNeel\Rhinoceros\5.0x64\Global Options\Plug-ins\ <X Guid> ]

*Edited to swap load and unload snippets.

You can remove the guid key and all its sub keys completely to unregister a plugin. Then either drag the plugin onto rhino to re-register or add the two install entries (name and location), see http://wiki.mcneel.com/developer/installingandregisteringaplugin

Right, but I want to quickly enable and disable a plugin, i.e.:

regedit.exe /s unloadExtraPlugins.reg

That is what I mean. In your case to unregister you can delete the plug-in Guid key and all its subkeys, and to (re-)register it you must set the Guid and Name and Location.

Unregister (note: do not use “Global Options” as you did in your first post)

[-HKEY_CURRENT_USER\Software\McNeel\Rhinoceros\5.0x64\Plug-ins\<X GUID>]

To register, do the following. Name should correspond to the plug-in name (defined by the C++ macro RHINO_PLUG_IN_NAME or the .NET AssemblyTitle attribute)

[HKEY_CURRENT_USER\Software\McNeel\Rhinoceros\5.0x64\Plug-Ins\<X GUID>]
"Name"="<X plug-in name>"
"FileName"="<full path to X plug-in RHP>"

Not all of the plugins I want to unload are in that current user location. In other words, there is nothing to unregister from that part of the hive.

Last night I had the idea to back up the McNeel keys, unload the plugins manually, back up the keys again and put them in WinMerge to see the changes. The global options key LoadProtection was 1 for load and 2 for unload. Modifying that flag is having the desired effect. Here are the full steps I used to cut Rhino’s startup time in half for debugging purposes (checked with Rhino.exe /stopwatch):

  1. Using the plain name of the plugins I wished to unload, I used RegEdit to search for the plugins’ GUID (X) in the following location:

    HKEY_LOCAL_MACHINE\SOFTWARE\McNeel\Rhinoceros\5.0x64\Plug-ins\
    
  2. I copied the GUIDs and wrote a .reg file to unload them prior to debugging:

    [HKEY_CURRENT_USER\Software\McNeel\Rhinoceros\5.0x64\Global Options\Plug-ins\X]
    "LoadProtection"="2"
    
  3. Wrote another .reg file that sets them back to load:

    [HKEY_CURRENT_USER\Software\McNeel\Rhinoceros\5.0x64\Global Options\Plug-ins\X]
    "LoadProtection"="1"
    
  4. Wrote a .bat file to silently merge the .reg file and rename grasshopper components I wish to skip loading:

    regedit /s I:\CAD\_Development\EndRhinoDev.reg
    rename C:\Users\Administrator\AppData\Roaming\Grasshopper\Libraries\Kangaroo0099.gha Kangaroo0099.gha.old
    
  5. Set the debugger to start the process with:

    Rhino.exe /nosplash /runscript="_Grasshopper" I:\CAD\_Development\Dev.3dm
    
  6. After I’m done developing, I run another bat file to undo everything and get all my fun tools back:

    regedit /s I:\CAD\_Development\EndRhinoDev.reg
    rename C:\Users\Administrator\AppData\Roaming\Grasshopper\Libraries\Kangaroo0099.gha.old Kangaroo0099.gha
    

Here are my files:

RhinoDevEnvSettings.7z (1.6 KB)