Files
wapt-packages/kg-disable-access-documents-wapt/setup.py
T
Kevin Guerineau 35519f74ad Add setup.py
2019-06-09 21:05:54 +02:00

21 lines
804 B
Python

# -*- coding: utf-8 -*-
from setuphelpers import *
uninstallkey = []
def install():
print('installing %s' % control.asrequirement())
registry_set(HKEY_LOCAL_MACHINE,'SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\documentsLibrary','Value','Deny')
def uninstall():
print('uninstalling %s' % control.asrequirement())
registry_set(HKEY_LOCAL_MACHINE,'SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\documentsLibrary','Value','Allow')
def audit():
print('Auditing %s' % control.asrequirement())
if registry_readstring(HKEY_LOCAL_MACHINE,'SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\documentsLibrary','Value').lower() == 'deny':
return 'OK'
else:
return 'Error'