I've got error message :
Requested registry access is denied
when trying to write into registery keys with turned on UAC :
RegistryKey.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, "") tawkey.OpenSubKey(x, true).SetValue(X, V, RegistryValueKind.DWord) Must I run "subinacl /subkeyreg HKEY_LOCAL_MACHINE\PathToMyKeys... /grant=user=f" during My software installation ? Or there is some other way to have access to my registry keys ?
Thank you.
Microsoft.Win32.Registry.LocalMachine.OpenSubKeyis definitely better but the problem you have is that standard users do not have write access toHKLM. You won't get around that by using different registry access APIs. They will all fail in the same way.