Add functions to disable Thunderbird Update (purge reg key when uninstall)
This commit is contained in:
parent
171f5ab5c9
commit
6c1c7f6b1a
20
setup.py
20
setup.py
|
@ -138,15 +138,21 @@ if __name__ == '__main__':
|
|||
|
||||
|
||||
def uninstall():
|
||||
print('uninstalling %s' % control.asrequirement())
|
||||
|
||||
for thunderbird in installed_softwares('Mozilla Thunderbird'):
|
||||
print('Uninstalling %s' % thunderbird['version'])
|
||||
run(uninstall_cmd(thunderbird['key']))
|
||||
|
||||
print('Removing registry entries')
|
||||
for reg in ['DisableAppUpdate','DisableTelemetry']:
|
||||
if reg_key_exists(HKEY_LOCAL_MACHINE,r'SOFTWARE\Policies\Mozilla\Thunderbird\%s' % reg):
|
||||
run(r'reg delete "HKLM\SOFTWARE\Policies\Mozilla\Thunderbird\%s" /va /f' % reg)
|
||||
return "ERROR : Can't remove registry entries"
|
||||
run(r'reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Thunderbird" /v "DisableAppUpdate" /f')
|
||||
run(r'reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Thunderbird" /v "DisableTelemetry" /f')
|
||||
|
||||
|
||||
|
||||
def audit():
|
||||
for reg in ['DisableAppUpdate','DisableTelemetry']:
|
||||
if reg_key_exists(HKEY_LOCAL_MACHINE,r'SOFTWARE\Policies\Mozilla\%s' % reg):
|
||||
print(r'Key HKLM\%s exists' % reg_key)
|
||||
return "ERROR : Keys is missing, for disable Thunderbird update"
|
||||
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 !')
|
Loading…
Reference in New Issue