hi,
I am trying to SetValue for my registry ket at LocalMachine->Software->MyApplication but getting the following error:
Requested registry access is not allowed.
this is the code I am using:
RegistryKey regkeyLocalMachine = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\MyPOSMachine", true); regkeyLocalMachine.SetValue(value_name, value_data, value_kind);
and the error is thrown on the first line (the OpenSubKey).
How can I fix it?
Thanks,