Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Requested registry access is not allowed.

$
0
0

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,

Jassim


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>