Add functions to disable Thunderbird Update

master
Heuze Florent 4 years ago
parent 7022bba420
commit 171f5ab5c9
  1. 6
      WAPT/control
  2. 22
      setup.py

@ -1,15 +1,15 @@
package : fws-thunderbird
version : 68.12.1-2
version : 68.12.1-3
architecture : all
section : base
priority : optional
name :
categories :
maintainer : Daniel Berteaud <daniel@firewall-services.com>
maintainer : Heuzef <heuzef@firewall-services.com>
description : Mozilla Thunderbird email client
depends :
conflicts :
maturity : RC
maturity : DEV
locale : fr
target_os : windows
min_os_version : 6.1

@ -87,6 +87,13 @@ def install():
print("Restoring distribution directory")
copytree2(src=r'distribution', dst=makepath(programfiles, "Mozilla Thunderbird", "distribution"))
# Disable Thunderbird Update
print("Disable Thunderbird Update")
key=reg_openkey_noredir(HKEY_LOCAL_MACHINE,r'SOFTWARE\Policies\Mozilla\Thunderbird',sam=KEY_WRITE, create_if_missing=True)
reg_setvalue(key,'DisableAppUpdate', 1, REG_DWORD)
reg_setvalue(key,'DisableTelemetry', 1, REG_DWORD)
else:
error('This package is not compatible with your WAPT version. Please upgrade to WAPT 1.5 or more.')
@ -128,3 +135,18 @@ def update_package():
if __name__ == '__main__':
update_package()
def uninstall():
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"
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"
Loading…
Cancel
Save