From cf4e92bdb80b577c447c7f075e61d1ca2fed9ddd Mon Sep 17 00:00:00 2001 From: Kevin Guerineau Date: Sun, 2 Jun 2019 18:14:51 +0200 Subject: [PATCH] Add r to registry path --- kg-disable-access-account-information-wapt/setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kg-disable-access-account-information-wapt/setup.py b/kg-disable-access-account-information-wapt/setup.py index cc8073b..af1adb6 100644 --- a/kg-disable-access-account-information-wapt/setup.py +++ b/kg-disable-access-account-information-wapt/setup.py @@ -5,15 +5,15 @@ uninstallkey = [] def install(): print('installing %s' % control.asrequirement()) - registry_set(HKEY_LOCAL_MACHINE,'SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userAccountInformation','Value','Deny') + registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userAccountInformation','Value','Deny') def uninstall(): print('uninstalling %s' % control.asrequirement()) - registry_set(HKEY_LOCAL_MACHINE,'SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userAccountInformation','Value','Allow') + registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userAccountInformation','Value','Allow') def audit(): print('Auditing %s' % control.asrequirement()) - if registry_readstring(HKEY_LOCAL_MACHINE,'SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userAccountInformation','Value').lower() == 'deny': + if registry_readstring(HKEY_LOCAL_MACHINE,r'SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userAccountInformation','Value').lower() == 'deny': return 'OK' else: return 'Error'