Registry Location/Setting For Plugins To Load

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)