Home > Back-end >  Registry createSubKey under LocalMachine
Registry createSubKey under LocalMachine

Time:09-21

When I try to apply these codes like below, It doesnt get an success result when I check the subdirectory SOFTWARE\Safenet\PTKC\WLD. Is there anybody what is the reason of this issue.

RegistryKey Location = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Safenet\PTKC", true);
RegistryKey newKey = Location.CreateSubKey("WLD", true);
newKey.SetValue("data", "value");
Location.Close();

CodePudding user response:

It was probably created in C:\Windows\SysWOW64\regedit.exe. Try building your application with only x64.

  • Related