did anybody play with setting Registry-Keys - as this could be done without or before starting rhino ?
[HKEY_CURRENT_USER\Software\McNeel\Rhinoceros\6.0\Global Options\Plug-ins\299f02bc-3538-4343-aca5-d66aaaeb789b]
"LoadProtection"="2"
loadprotection = 1 -> plug in will load
loadprotection = 2 -> plug in will not load
but did not find any documentation about it ;-/
ok i come up with the following:
setting the registry seams to work very well - and without starting rhino:
i use a small console - app c# - no rhinocommon:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Win32;
namespace SetRegistryKey
{
// small Programm to set a rhino-registry-key to load / not load a pluginin
// pass plugin-Guid and
class Program
{
// args[0] -> plugin Guid
// args[1] -> "1" -> load plugin "2" do not load plugin
static void Main(string[] args)
{
if (args.Length == 2 &&
(Guid.TryParse(args[0], out _)) &&
(int.TryParse(args[1],out _)))
{
string keyName = @"HKEY_CURRENT_USER\Software\McNeel\Rhinoceros\6.0\Global Options\Plug-ins\" + args[0]; // + "\\" + "LoadProtection";
Registry.SetValue(keyName, "LoadProtection", args[1]);
} else
{
Console.WriteLine("Bad Arguments");
Console.WriteLine("Press any key to quit");
Console.ReadKey();
}
}
}
}
i call this app via a shortcut, and the shortcut is including the parameters:
plugin-Guid and 1or2
for example for Rhinocam 2019:
Shortcut Target to disable is:
"C:\Program Files\Rhino 6\Plug-ins\SetRegistryKey.exe" 299f02bc-3538-4343-aca5-d66aaaeb789b 2
Shortcut Target to enable is:
"C:\Program Files\Rhino 6\Plug-ins\SetRegistryKey.exe" 299f02bc-3538-4343-aca5-d66aaaeb789b 1
for me this works very well. best from zurich - tom