Add functions to disable Thunderbird Update

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

@ -1,41 +1,41 @@
package : fws-thunderbird package : fws-thunderbird
version : 68.12.1-2 version : 68.12.1-3
architecture : all architecture : all
section : base section : base
priority : optional priority : optional
name : name :
categories : categories :
maintainer : Daniel Berteaud <daniel@firewall-services.com> maintainer : Heuzef <heuzef@firewall-services.com>
description : Mozilla Thunderbird email client description : Mozilla Thunderbird email client
depends : depends :
conflicts : conflicts :
maturity : RC maturity : DEV
locale : fr locale : fr
target_os : windows target_os : windows
min_os_version : 6.1 min_os_version : 6.1
max_os_version : max_os_version :
min_wapt_version : 1.7 min_wapt_version : 1.7
sources : sources :
installed_size : installed_size :
impacted_process : thunderbird.exe impacted_process : thunderbird.exe
description_fr : Client de messagerie Mozilla Thunderbird description_fr : Client de messagerie Mozilla Thunderbird
description_pl : description_pl :
description_de : description_de :
description_es : description_es :
description_pt : description_pt :
description_it : description_it :
description_nl : description_nl :
description_ru : description_ru :
audit_schedule : 2d audit_schedule : 2d
editor : editor :
keywords : email,mail,pop,imap,smtp keywords : email,mail,pop,imap,smtp
licence : licence :
homepage : https://www.thunderbird.net/fr/ homepage : https://www.thunderbird.net/fr/
package_uuid : c780c68e-d7a0-4292-816c-65a144d8662e package_uuid : c780c68e-d7a0-4292-816c-65a144d8662e
valid_from : valid_from :
valid_until : valid_until :
forced_install_on : forced_install_on :
changelog : changelog :
signer : Heuze Florent signer : Heuze Florent
signer_fingerprint: 609cb7b3556c1468082b757d212d7416fbcb4e13b1b54497d32647ac6c57f567 signer_fingerprint: 609cb7b3556c1468082b757d212d7416fbcb4e13b1b54497d32647ac6c57f567
signature : EcuDcZuR5eWY1tmta60ghO50c7wByHOWt8FKW2ojr4OrZgYPAdMKsz8cF+oN0u7rtR7JLWtl84080Q/j7vdychv5KTwm2fYn2iiBDM80mGiMTqwFrF8g7BTjoqQVIRfSECwqSJNz6UPCrgj2gqAJIUIXvmdip3TEM8rEe9uBwFfZwh/zSkTTW5fjvKxeREwQtMhVJrJan+G0mOuPNM9ibMtximKo0aubjwjNMC6HImULCgTEddkoupOh4/HrNb8KuX5tcWXxyd6vciHJxZfXAyhBnD/IbS/5flXYqAuvbYvO6sAf1mwjs77q7NoZcbpA5W/6at3qQ4qPmYvkKqpF3A== signature : EcuDcZuR5eWY1tmta60ghO50c7wByHOWt8FKW2ojr4OrZgYPAdMKsz8cF+oN0u7rtR7JLWtl84080Q/j7vdychv5KTwm2fYn2iiBDM80mGiMTqwFrF8g7BTjoqQVIRfSECwqSJNz6UPCrgj2gqAJIUIXvmdip3TEM8rEe9uBwFfZwh/zSkTTW5fjvKxeREwQtMhVJrJan+G0mOuPNM9ibMtximKo0aubjwjNMC6HImULCgTEddkoupOh4/HrNb8KuX5tcWXxyd6vciHJxZfXAyhBnD/IbS/5flXYqAuvbYvO6sAf1mwjs77q7NoZcbpA5W/6at3qQ4qPmYvkKqpF3A==

@ -87,6 +87,13 @@ def install():
print("Restoring distribution directory") print("Restoring distribution directory")
copytree2(src=r'distribution', dst=makepath(programfiles, "Mozilla Thunderbird", "distribution")) 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: else:
error('This package is not compatible with your WAPT version. Please upgrade to WAPT 1.5 or more.') 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__': if __name__ == '__main__':
update_package() 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