HI;
I registering my Plug-in followed This Web page, but after running the code, the program throws an error message:
Requested registry access is not allowed.
RegistryKey localMachine64 = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64);
RegistryKey registryKey = localMachine64.OpenSubKey(@"SOFTWARE\McNeel\Rhinoceros\7.0\Plug-ins\4a5af943-0ee7-43aa-92f2-94fa5be8de8f", true);
if (registryKey == null)
{
RegistryKey software = localMachine64.OpenSubKey(@"SOFTWARE\McNeel\Rhinoceros\7.0\Plug-ins", true);
if (software != null)
{
RegistryKey aimdir = software.CreateSubKey("4a5af943-0ee7-43aa-92f2-94fa5be8de8f");
aimdir.SetValue("Name", "MYTEST", RegistryValueKind.String);
aimdir.SetValue("FileName", patch, RegistryValueKind.String);
}
localMachine64.Close();
software.Close();
}
If install by rhino, that is ok when write to registry, who can give me some ideas ?