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 = []
|
||||
|
||||
|
||||
def on_dist_backup(operation,src,dst):
|
||||
# When we backup the distribution dir, we have to exclude
|
||||
# lightning as a new version will be installed, bundled with TB itself.
|
||||
|
@ -151,7 +152,11 @@ def uninstall():
|
|||
|
||||
def audit():
|
||||
for reg in ['DisableAppUpdate','DisableTelemetry']:
|
||||
if reg_key_exists(HKEY_LOCAL_MACHINE,r'SOFTWARE\Policies\Mozilla\Thunderbird\DisableAppUpdate'):
|
||||
print(r'Key HKLM\SOFTWARE\Policies\Mozilla\Thunderbird\%s exists' % reg)
|
||||
else:
|
||||
print('ERROR : Keys is missing for disable update !')
|
||||
if not registry_readstring(HKEY_LOCAL_MACHINE, r'SOFTWARE\Policies\Mozilla\Thunderbird\%s' % reg):
|
||||
print(r'Warning : SOFTWARE\Policies\Mozilla\Thunderbird\%s is missing !' % reg)
|
||||
return "WARNING"
|
||||
|
||||
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