using Win = Microsoft.Win32;
Win.RegistryKey key = Win.Registry.CurrentUser;
key = key.OpenSubKey(Keypath,true);
if (key == null)
{
key = Win.Registry.CurrentUser;
key = key.CreateSubKey(Keypath);
key.SetValue("DESCRIPTION",(string)"x dll autoload",RegistryValueKind.String);
key.SetValue("LOADCTRLS",2,RegistryValueKind.DWord);
key.SetValue("MANAGED", 1, RegistryValueKind.DWord);
key.SetValue("LOADER",(string)@"C:\Program Files\Autodesk\" + AcadVer + @"\Support\LexStartup.dll",RegistryValueKind.String);
}
key.Close();
You can set reg keys something like this