Update Emsisoft sections
This commit is contained in:
parent
1138347b29
commit
07155c9f0e
1 changed files with 15 additions and 9 deletions
|
|
@ -33,7 +33,12 @@ from wk.io import (
|
||||||
non_clobber_path,
|
non_clobber_path,
|
||||||
rename_item,
|
rename_item,
|
||||||
)
|
)
|
||||||
from wk.kit.tools import (download_tool, get_tool_path, run_tool)
|
from wk.kit.tools import (
|
||||||
|
download_tool,
|
||||||
|
extract_archive,
|
||||||
|
get_tool_path,
|
||||||
|
run_tool,
|
||||||
|
)
|
||||||
from wk.log import format_log_path, update_log_path
|
from wk.log import format_log_path, update_log_path
|
||||||
from wk.os.win import (
|
from wk.os.win import (
|
||||||
ARCH,
|
ARCH,
|
||||||
|
|
@ -92,7 +97,7 @@ MBAM_UNINSTALL_KEY = (
|
||||||
r'\{35065F43-4BB2-439A-BFF7-0F1014F2E0CD}_is1'
|
r'\{35065F43-4BB2-439A-BFF7-0F1014F2E0CD}_is1'
|
||||||
)
|
)
|
||||||
SYSTEMDRIVE = os.environ.get('SYSTEMDRIVE', 'C:')
|
SYSTEMDRIVE = os.environ.get('SYSTEMDRIVE', 'C:')
|
||||||
EMSISOFT_INSTALL_PATH = f'{SYSTEMDRIVE}/EmsisoftCmd'
|
EMSISOFT_INSTALL_PATH = get_path_obj(f'{SYSTEMDRIVE}/EmsisoftCmd')
|
||||||
WHITELIST = '\n'.join((
|
WHITELIST = '\n'.join((
|
||||||
str(CONEMU_EXE),
|
str(CONEMU_EXE),
|
||||||
fr'{PROGRAMFILES_32}\TeamViewer\TeamViewer.exe',
|
fr'{PROGRAMFILES_32}\TeamViewer\TeamViewer.exe',
|
||||||
|
|
@ -988,7 +993,9 @@ def fix_file_associations():
|
||||||
|
|
||||||
def install_emsisoft_cmd():
|
def install_emsisoft_cmd():
|
||||||
"""Install EmsisoftCmd."""
|
"""Install EmsisoftCmd."""
|
||||||
run_tool('EmsisoftCmd', 'EmsisoftCmd', '/S', download=True)
|
download_tool('EmsisoftCmd', 'EmsisoftCmd')
|
||||||
|
installer = get_tool_path('EmsisoftCmd', 'EmsisoftCmd')
|
||||||
|
extract_archive(installer, EMSISOFT_INSTALL_PATH, '-aos')
|
||||||
|
|
||||||
|
|
||||||
def install_mbam():
|
def install_mbam():
|
||||||
|
|
@ -1200,19 +1207,18 @@ def run_tdsskiller():
|
||||||
def uninstall_emsisoft_cmd():
|
def uninstall_emsisoft_cmd():
|
||||||
"""Uninstall EmsisoftCmd.
|
"""Uninstall EmsisoftCmd.
|
||||||
|
|
||||||
NOTE: An uninstaller is no longer provided? Just delete the folder I guess.
|
NOTE: If the epp service was installed previously then it may get in
|
||||||
|
the way. Just in case this wil attempt to stop and delete it.
|
||||||
"""
|
"""
|
||||||
cmd = [f'{EMSISOFT_INSTALL_PATH}/a2cmd.exe', '/uninstallservice']
|
|
||||||
proc = popen_program(cmd)
|
|
||||||
proc.wait()
|
|
||||||
|
|
||||||
# Stop service
|
|
||||||
try:
|
try:
|
||||||
stop_service('epp')
|
stop_service('epp')
|
||||||
except GenericError:
|
except GenericError:
|
||||||
# Ignore and delete *most* of EmsisoftCmd
|
# Ignore and delete *most* of EmsisoftCmd
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
# Delete service (if possible / present)
|
||||||
|
run_program(['sc', 'delete', 'epp'], check=False)
|
||||||
|
|
||||||
# Delete install dir
|
# Delete install dir
|
||||||
## NOTE: Using ingore_errors=True in case service dll can't be removed.
|
## NOTE: Using ingore_errors=True in case service dll can't be removed.
|
||||||
delete_folder(EMSISOFT_INSTALL_PATH, force=True, ignore_errors=True)
|
delete_folder(EMSISOFT_INSTALL_PATH, force=True, ignore_errors=True)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue