Update Emsisoft sections

This commit is contained in:
2Shirt 2021-10-21 02:46:29 -06:00
parent da74063d8a
commit 38a40c5551
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
2 changed files with 23 additions and 19 deletions

View file

@ -64,7 +64,9 @@ BASE_MENUS = {
MenuEntry('BleachBit', 'auto_bleachbit'),
MenuEntry('HitmanPro', 'auto_hitmanpro'),
MenuEntry('KVRT', 'auto_kvrt'),
MenuEntry('EmsisoftCmd', 'auto_emsisoft_cmd'),
MenuEntry('EmsisoftCmd', 'auto_emsisoft_cmd_run'),
MenuEntry('Reboot', 'auto_reboot'),
MenuEntry('EmsisoftCmd (Uninstall)', 'auto_emsisoft_cmd_uninstall'),
MenuEntry('Windows Defender', 'auto_microsoft_defender'),
MenuEntry('Remove Custom Power Plan', 'auto_remove_power_plan'),
MenuEntry('Reboot', 'auto_reboot'),

View file

@ -657,12 +657,18 @@ def auto_dism(group, name):
reboot()
def auto_emsisoft_cmd(group, name):
def auto_emsisoft_cmd_run(group, name):
"""Run EmisoftCmd."""
TRY_PRINT.run('EmsisoftCmd (Install)...', install_emsisoft_cmd)
TRY_PRINT.run('EmsisoftCmd (Update)...', update_emsisoft_cmd)
result = TRY_PRINT.run('EmsisoftCmd (Scan)...', run_emsisoft_cmd_scan)
TRY_PRINT.run('EmsisoftCmd (Uninstall)...', uninstall_emsisoft_cmd)
TRY_PRINT.run('EmsisoftCmd (Uninstall Service)...', delete_emsisoft_cmd_service)
save_settings(group, name, result=result)
def auto_emsisoft_cmd_uninstall(group, name):
"""Uninstall EmsisoftCmd."""
result = TRY_PRINT.run('EmsisoftCmd (Uninstall)...', uninstall_emsisoft_cmd)
save_settings(group, name, result=result)
@ -973,6 +979,17 @@ def backup_registry():
run_tool('ERUNT', 'ERUNT', backup_path, 'sysreg', 'curuser', 'otherusers')
def delete_emsisoft_cmd_service():
"""Delete EmsisoftCmd service."""
try:
stop_service('epp')
except GenericError:
pass
# Delete service
run_program(['sc', 'delete', 'epp'], check=False)
def delete_registry_null_keys():
"""Delete registry keys with embedded null characters."""
run_tool('RegDelNull', 'RegDelNull', '-s', '-y', download=True)
@ -1205,22 +1222,7 @@ def run_tdsskiller():
def uninstall_emsisoft_cmd():
"""Uninstall EmsisoftCmd.
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.
"""
try:
stop_service('epp')
except GenericError:
# Ignore and delete *most* of EmsisoftCmd
pass
# Delete service (if possible / present)
run_program(['sc', 'delete', 'epp'], check=False)
# Delete install dir
## NOTE: Using ingore_errors=True in case service dll can't be removed.
"""Uninstall EmsisoftCmd."""
delete_folder(EMSISOFT_INSTALL_PATH, force=True, ignore_errors=True)