I’m trying to access a certain bit of the registry however it keeps returning null when i try to open it.
However i know the location is correct because i can navigate to it in reedit.
here’s my line of code for trying to access it.
Microsoft.Win32.RegistryKey RK = Microsoft.Win32.Registry.LocalMachine.OpenSubK("Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData", false);
any one got any ideas?
update
it looks like i am seeing a different version fo the registery, this need to be a 32bit app but it needs to be able to see the 32bit and 64bit version of the registery.
Thank you
Did you apply permissions to access the registry key via the attribute
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.LinkDemand, Flags = System.Security.Permissions.SecurityPermissionFlag.RegistryPermission)]or are you running the program as administrator? Here’s a detailed look at the Security Permissions as per MSDN, more aptly RegistryPermission