Add functions to disable Thunderbird Update (purge reg key when uninstall)

master
Heuze Florent 4 years ago
parent 171f5ab5c9
commit 6c1c7f6b1a
  1. 20
      setup.py

@ -138,15 +138,21 @@ if __name__ == '__main__':
def uninstall(): 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') print('Removing registry entries')
for reg in ['DisableAppUpdate','DisableTelemetry']: run(r'reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Thunderbird" /v "DisableAppUpdate" /f')
if reg_key_exists(HKEY_LOCAL_MACHINE,r'SOFTWARE\Policies\Mozilla\Thunderbird\%s' % reg): run(r'reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Thunderbird" /v "DisableTelemetry" /f')
run(r'reg delete "HKLM\SOFTWARE\Policies\Mozilla\Thunderbird\%s" /va /f' % reg)
return "ERROR : Can't remove registry entries"
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\%s' % reg): if reg_key_exists(HKEY_LOCAL_MACHINE,r'SOFTWARE\Policies\Mozilla\Thunderbird\DisableAppUpdate'):
print(r'Key HKLM\%s exists' % reg_key) print(r'Key HKLM\SOFTWARE\Policies\Mozilla\Thunderbird\%s exists' % reg)
return "ERROR : Keys is missing, for disable Thunderbird update" else:
print('ERROR : Keys is missing for disable update !')
Loading…
Cancel
Save