Add function for audit
This commit is contained in:
parent
2daf9320b8
commit
385177c61e
13
setup.py
13
setup.py
|
@ -27,6 +27,7 @@ import subprocess
|
||||||
|
|
||||||
uninstallkey = []
|
uninstallkey = []
|
||||||
|
|
||||||
|
|
||||||
def on_dist_backup(operation,src,dst):
|
def on_dist_backup(operation,src,dst):
|
||||||
# When we backup the distribution dir, we have to exclude
|
# When we backup the distribution dir, we have to exclude
|
||||||
# lightning as a new version will be installed, bundled with TB itself.
|
# lightning as a new version will be installed, bundled with TB itself.
|
||||||
|
@ -151,7 +152,11 @@ def uninstall():
|
||||||
|
|
||||||
def audit():
|
def audit():
|
||||||
for reg in ['DisableAppUpdate','DisableTelemetry']:
|
for reg in ['DisableAppUpdate','DisableTelemetry']:
|
||||||
if reg_key_exists(HKEY_LOCAL_MACHINE,r'SOFTWARE\Policies\Mozilla\Thunderbird\DisableAppUpdate'):
|
if not registry_readstring(HKEY_LOCAL_MACHINE, r'SOFTWARE\Policies\Mozilla\Thunderbird\%s' % reg):
|
||||||
print(r'Key HKLM\SOFTWARE\Policies\Mozilla\Thunderbird\%s exists' % reg)
|
print(r'Warning : SOFTWARE\Policies\Mozilla\Thunderbird\%s is missing !' % reg)
|
||||||
else:
|
return "WARNING"
|
||||||
print('ERROR : Keys is missing for disable update !')
|
|
||||||
|
value = registry_readstring(HKEY_LOCAL_MACHINE, r'SOFTWARE\Policies\Mozilla\Thunderbird\%s' % reg)
|
||||||
|
if value != "1" :
|
||||||
|
print("Warning : Thunderbird update is not disable !")
|
||||||
|
return "WARNING"
|
Loading…
Reference in New Issue
Block a user