Initial commit for disable filesystem package

This commit is contained in:
Kevin Guerineau
2019-06-09 21:36:39 +02:00
parent e02a4911b3
commit e024355578
3 changed files with 353 additions and 0 deletions
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
from setuphelpers import *
uninstallkey = []
def install():
print('installing %s' % control.asrequirement())
registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\broadFileSystemAccess','Value','Deny')
def uninstall():
print('uninstalling %s' % control.asrequirement())
registry_set(HKEY_LOCAL_MACHINE,r'SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\broadFileSystemAccess','Value','Allow')
def audit():
print('Auditing %s' % control.asrequirement())
if registry_readstring(HKEY_LOCAL_MACHINE,r'SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\broadFileSystemAccess','Value').lower() == 'deny':
return 'OK'
else:
return 'Error'