_winreg.DeleteValue - Permission denied ...

Harald Schneider h_schneider at marketmix.com
Fri Sep 27 03:12:55 EDT 2002


Hi,

go a prob here with _winreg.

When I try to delete a registry key, I get a WindowsError (Errno5) /
Permission denied, even thought I am logged in as admin.
Deleting the same key with regedit works.

The function looks like this:

    def del_cfg_path(self):
        key =
_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,'SOFTWARE\TEST\SUBTEST)
        _winreg.DeleteValue(key,"TESTVAL")
        _winreg.CloseKey(key)

Any ideas ?

Thanks a lot,
Harald






More information about the Python-list mailing list