[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

Paul report at bugs.python.org
Thu May 6 13:35:36 EDT 2021


Paul <paulenet at gmail.com> added the comment:

Eryk:

The whoami process check output shows that my account is in BUILTIN\Administrators, which proves that the account I am logged in as local Administrator permissions.

As for the OpenKey method, it fails with [WinError 5] Access denied, exactly the same way my example also failed, and the reason why these consistently fail is because they are pointed to HKLM, essentially replicating the issue that I pointed out.  I have also tried different combinations of security flags (winreg.KEY_ALL_ACCESS, winreg.KEY_WOW64_64KEY, etc.), but keep getting the same results.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44046>
_______________________________________


More information about the Python-bugs-list mailing list