I was trying to access a custom registry on Win 7 64 bit machine, but every time I try to do that it throws an error saying that
WindowsError: [Error2] The system cannot find the file specified
The registry that I was trying to access is:
HKEY_LOCAL_MACHINE\SOFTWARE\test11
I used the following code to access it:
import _winreg
handle_1 = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,r"SOFTWARE\test11")
Also when I try to create registry, like this:
handle_1 = _winreg.CreateKey(_winreg.HKEY_LOCAL_MACHINE,r"SOFTWARE\test11")
It creates the key in the following location:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\test11
I don't understand why it doesn't create it like this
HKEY_LOCAL_MACHINE\SOFTWARE\test11
This should work :