parent
f84a8f7616
commit
2fcfada0cd
3 changed files with 377 additions and 0 deletions
@ -0,0 +1,32 @@ |
|||||||
|
package : fws-remove-fwsupdates |
||||||
|
version : 1 |
||||||
|
architecture : all |
||||||
|
section : base |
||||||
|
priority : optional |
||||||
|
maintainer : Daniel Berteaud |
||||||
|
description : Remove FWSUpdates |
||||||
|
depends : |
||||||
|
conflicts : |
||||||
|
maturity : DEV |
||||||
|
locale : all |
||||||
|
target_os : windows |
||||||
|
min_os_version : 5.0 |
||||||
|
max_os_version : |
||||||
|
min_wapt_version : 1.5 |
||||||
|
sources : |
||||||
|
installed_size : |
||||||
|
impacted_process : |
||||||
|
description_fr : |
||||||
|
description_pl : |
||||||
|
description_de : |
||||||
|
description_es : |
||||||
|
audit_schedule : 4w |
||||||
|
editor : |
||||||
|
keywords : |
||||||
|
licence : |
||||||
|
homepage : https://www.firewall-services.com/ |
||||||
|
package_uuid : |
||||||
|
signer : Daniel Berteaud |
||||||
|
signer_fingerprint: |
||||||
|
signature_date : |
||||||
|
signed_attributes : |
@ -0,0 +1,50 @@ |
|||||||
|
# -*- coding: utf-8 -*- |
||||||
|
from setuphelpers import * |
||||||
|
|
||||||
|
uninstallkey = [] |
||||||
|
|
||||||
|
def install(): |
||||||
|
print('Shutdown scripts') |
||||||
|
remove_shutdown_script(r'fwsupdates.vbs') |
||||||
|
remove_shutdown_script(r'wpkg.bat') |
||||||
|
|
||||||
|
print('Removing start menu entries') |
||||||
|
if isfile(makepath(os.getenv('ALLUSERSPROFILE'),'Microsoft','Windows','Start Menu','Programs','Startup','chkupd_bgmon.vbs')): |
||||||
|
try: |
||||||
|
remove_file(makepath(os.getenv('ALLUSERSPROFILE'),'Microsoft','Windows','Start Menu','Programs','Startup','chkupd_bgmon.vbs')) |
||||||
|
except: |
||||||
|
delete_at_next_reboot(makepath(os.getenv('ALLUSERSPROFILE'),'Microsoft','Windows','Start Menu','Programs','Startup','chkupd_bgmon.vbs')) |
||||||
|
|
||||||
|
print('Removing %s' % makepath(os.getenv('SYSTEMDRIVE','C:'),'FWSUpdates')) |
||||||
|
if isdir(makepath(os.getenv('SYSTEMDRIVE','C:'),'FWSUpdates')): |
||||||
|
try: |
||||||
|
remove_tree(makepath(os.getenv('SYSTEMDRIVE','C:'),'FWSUpdates')) |
||||||
|
except: |
||||||
|
delete_at_next_reboot(makepath(os.getenv('SYSTEMDRIVE','C:'),'FWSUpdates')) |
||||||
|
|
||||||
|
print('Removing desktop shortcut') |
||||||
|
remove_desktop_shortcut('FWS Updates') |
||||||
|
|
||||||
|
print('Removing registry entries') |
||||||
|
for reg in ['FWSUpdates','iPasserelle']: |
||||||
|
if reg_key_exists(HKEY_LOCAL_MACHINE,r'SOFTWARE\%s' % reg): |
||||||
|
run(r'reg delete "HKLM\SOFTWARE\%s" /va /f' % reg) |
||||||
|
|
||||||
|
print('Remove scheduled task') |
||||||
|
if task_exists('sync_wpkg'): |
||||||
|
delete_task('sync_wpkg') |
||||||
|
|
||||||
|
def audit(): |
||||||
|
for reg in ['FWSUpdates','iPasserelle']: |
||||||
|
if reg_key_exists(HKEY_LOCAL_MACHINE,r'SOFTWARE\%s' % reg): |
||||||
|
print(r'Key HKLM\%s still exists' % reg_key) |
||||||
|
return "ERROR" |
||||||
|
if isdir(makepath(os.getenv('SYSTEMDRIVE','C:'),'FWSUpdates')): |
||||||
|
print(r'%s still exists' % makepath(os.getenv('SYSTEMDRIVE','C:'),'FWSUpdates')) |
||||||
|
return "ERROR" |
||||||
|
if task_exists('sync_wpkg'): |
||||||
|
print('Scheduled task sync_wpkg still exists') |
||||||
|
return "ERROR" |
||||||
|
return "OK" |
||||||
|
|
||||||
|
|
Loading…
Reference in new issue