7
Answers

Unable to open registry subkey On windows 10 PC using C#

Sujeet Suman

Sujeet Suman

7y
326
1
I unable to open programmatically registry subkey on windows 10 PC.
 
I am getting exception by using below code.
 

using (RegistryKey keys = Registry.LocalMachine.OpenSubKey(a_Path,      RegistryKeyPermissionCheck.ReadWriteSubTree, RegistryRights.FullControl))

{
      // Doing some operation like  reading some value
}
 
Exception:

Requested registry access is not allowed.

Can any body help me to come out. 
 
Answers (7)