Update 1201 sections to match upstream code
This commit is contained in:
parent
816ebd4d49
commit
f3496ed795
3 changed files with 281 additions and 281 deletions
|
|
@ -4,46 +4,46 @@ from functions.setup import *
|
|||
|
||||
# STATIC VARIABLES
|
||||
D7_HKCR_CLEANUP = {
|
||||
r'batfile\shell\!!RunWithParms': {'Recurse': True},
|
||||
r'batfile\shell\{0001B4FD-9EA3-4D90-A79E-FD14BA3AB01D}': {'Recurse': True},
|
||||
r'cmdfile\shell\!!RunWithParms': {'Recurse': True},
|
||||
r'cmdfile\shell\{0001B4FD-9EA3-4D90-A79E-FD14BA3AB01D}': {'Recurse': True},
|
||||
r'exefile\shell\!!RunWithParms': {'Recurse': True},
|
||||
r'exefile\shell\ResourceHacker': {'Recurse': True},
|
||||
r'regfile\shell\!!RunWithParms': {'Recurse': True},
|
||||
r'regfile\shell\{0001B4FD-9EA3-4D90-A79E-FD14BA3AB01D}': {'Recurse': True},
|
||||
}
|
||||
r'batfile\shell\!!RunWithParms': {'Recurse': True},
|
||||
r'batfile\shell\{0001B4FD-9EA3-4D90-A79E-FD14BA3AB01D}': {'Recurse': True},
|
||||
r'cmdfile\shell\!!RunWithParms': {'Recurse': True},
|
||||
r'cmdfile\shell\{0001B4FD-9EA3-4D90-A79E-FD14BA3AB01D}': {'Recurse': True},
|
||||
r'exefile\shell\!!RunWithParms': {'Recurse': True},
|
||||
r'exefile\shell\ResourceHacker': {'Recurse': True},
|
||||
r'regfile\shell\!!RunWithParms': {'Recurse': True},
|
||||
r'regfile\shell\{0001B4FD-9EA3-4D90-A79E-FD14BA3AB01D}': {'Recurse': True},
|
||||
}
|
||||
D7_HKCU_CLEANUP = {
|
||||
r'Software\Malwarebytes': {'Recurse': False},
|
||||
}
|
||||
r'Software\Malwarebytes': {'Recurse': False},
|
||||
}
|
||||
D7_HKLM_CLEANUP = {
|
||||
r'Software\Emsisoft': {'Recurse': False},
|
||||
}
|
||||
r'Software\Emsisoft': {'Recurse': False},
|
||||
}
|
||||
HKU = winreg.HKEY_USERS
|
||||
HKCR = winreg.HKEY_CLASSES_ROOT
|
||||
HKCU = winreg.HKEY_CURRENT_USER
|
||||
HKLM = winreg.HKEY_LOCAL_MACHINE
|
||||
UAC_DEFAULTS_WIN7 = {
|
||||
r'Software\Microsoft\Windows\CurrentVersion\Policies\System': {
|
||||
'DWORD Items': {
|
||||
'ConsentPromptBehaviorAdmin': 5,
|
||||
'EnableLUA': 1,
|
||||
'PromptOnSecureDesktop': 1,
|
||||
},
|
||||
},
|
||||
}
|
||||
r'Software\Microsoft\Windows\CurrentVersion\Policies\System': {
|
||||
'DWORD Items': {
|
||||
'ConsentPromptBehaviorAdmin': 5,
|
||||
'EnableLUA': 1,
|
||||
'PromptOnSecureDesktop': 1,
|
||||
},
|
||||
},
|
||||
}
|
||||
UAC_DEFAULTS_WIN10 = {
|
||||
r'Software\Microsoft\Windows\CurrentVersion\Policies\System': {
|
||||
'DWORD Items': {
|
||||
'ConsentPromptBehaviorAdmin': 5,
|
||||
'ConsentPromptBehaviorUser': 3,
|
||||
'EnableInstallerDetection': 1,
|
||||
'EnableLUA': 1,
|
||||
'EnableVirtualization': 1,
|
||||
'PromptOnSecureDesktop': 1,
|
||||
},
|
||||
},
|
||||
}
|
||||
r'Software\Microsoft\Windows\CurrentVersion\Policies\System': {
|
||||
'DWORD Items': {
|
||||
'ConsentPromptBehaviorAdmin': 5,
|
||||
'ConsentPromptBehaviorUser': 3,
|
||||
'EnableInstallerDetection': 1,
|
||||
'EnableLUA': 1,
|
||||
'EnableVirtualization': 1,
|
||||
'PromptOnSecureDesktop': 1,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def cleanup_adwcleaner():
|
||||
|
|
@ -112,81 +112,81 @@ def cleanup_cbs(dest_folder):
|
|||
|
||||
|
||||
def cleanup_d7ii():
|
||||
"""Sort d7II logs and remove temp items."""
|
||||
d7_path = r'{}\d7II'.format(global_vars['ClientDir'])
|
||||
d7_reports = r'{} Reports'.format(d7_path)
|
||||
d7_temp = r'{}\Temp'.format(d7_path)
|
||||
"""Sort d7II logs and remove temp items."""
|
||||
d7_path = r'{}\d7II'.format(global_vars['ClientDir'])
|
||||
d7_reports = r'{} Reports'.format(d7_path)
|
||||
d7_temp = r'{}\Temp'.format(d7_path)
|
||||
|
||||
# Logs & Reports
|
||||
if os.path.exists(d7_reports):
|
||||
for entry in os.scandir(d7_reports):
|
||||
r = re.match(r'(\d+)-(\d+)-(\d+)', entry.name)
|
||||
d7_date = '{}-{:02d}-{:02d}'.format(
|
||||
r.group(1), int(r.group(2)), int(r.group(3)))
|
||||
d7_mlogs = r'{}\Malware Logs'.format(entry.path)
|
||||
log_dest = r'{SYSTEMDRIVE}\{prefix}\Logs\{date}'.format(
|
||||
prefix=KIT_NAME_SHORT,
|
||||
date=d7_date,
|
||||
**global_vars['Env'])
|
||||
os.makedirs(r'{}\d7II'.format(log_dest), exist_ok=True)
|
||||
os.makedirs(r'{}\Tools'.format(log_dest), exist_ok=True)
|
||||
# Logs & Reports
|
||||
if os.path.exists(d7_reports):
|
||||
for entry in os.scandir(d7_reports):
|
||||
r = re.match(r'(\d+)-(\d+)-(\d+)', entry.name)
|
||||
d7_date = '{}-{:02d}-{:02d}'.format(
|
||||
r.group(1), int(r.group(2)), int(r.group(3)))
|
||||
d7_mlogs = r'{}\Malware Logs'.format(entry.path)
|
||||
log_dest = r'{SYSTEMDRIVE}\{prefix}\Logs\{date}'.format(
|
||||
prefix=KIT_NAME_SHORT,
|
||||
date=d7_date,
|
||||
**global_vars['Env'])
|
||||
os.makedirs(r'{}\d7II'.format(log_dest), exist_ok=True)
|
||||
os.makedirs(r'{}\Tools'.format(log_dest), exist_ok=True)
|
||||
|
||||
# Malware Logs
|
||||
if os.path.exists(d7_mlogs):
|
||||
m_report = 'MalwareScan_Report.txt'
|
||||
for m_entry in os.scandir(d7_mlogs):
|
||||
if m_entry.name == m_report:
|
||||
dest_path = r'{}\d7II\{}'.format(log_dest, m_entry.name)
|
||||
else:
|
||||
dest_path = r'{}\Tools\{}'.format(log_dest, m_entry.name)
|
||||
dest_path = non_clobber_rename(dest_path)
|
||||
shutil.move(m_entry.path, dest_path)
|
||||
# Malware Logs
|
||||
if os.path.exists(d7_mlogs):
|
||||
m_report = 'MalwareScan_Report.txt'
|
||||
for m_entry in os.scandir(d7_mlogs):
|
||||
if m_entry.name == m_report:
|
||||
dest_path = r'{}\d7II\{}'.format(log_dest, m_entry.name)
|
||||
else:
|
||||
dest_path = r'{}\Tools\{}'.format(log_dest, m_entry.name)
|
||||
dest_path = non_clobber_rename(dest_path)
|
||||
shutil.move(m_entry.path, dest_path)
|
||||
|
||||
# Other items
|
||||
for o_entry in os.scandir(entry.path):
|
||||
dest_path = r'{log_dest}\d7II\{name}'.format(
|
||||
log_dest=log_dest,
|
||||
name=o_entry.name)
|
||||
dest_path = non_clobber_rename(dest_path)
|
||||
# Other items
|
||||
for o_entry in os.scandir(entry.path):
|
||||
dest_path = r'{log_dest}\d7II\{name}'.format(
|
||||
log_dest=log_dest,
|
||||
name=o_entry.name)
|
||||
dest_path = non_clobber_rename(dest_path)
|
||||
|
||||
# Just remove empty folders
|
||||
if o_entry.is_dir():
|
||||
try:
|
||||
os.rmdir(o_entry.path)
|
||||
except OSError:
|
||||
pass
|
||||
else:
|
||||
continue
|
||||
|
||||
# Move item
|
||||
shutil.move(o_entry.path, dest_path)
|
||||
|
||||
# Remove folder
|
||||
delete_empty_folders(entry.path)
|
||||
|
||||
# Registry Items
|
||||
for key, settings in D7_HKCR_CLEANUP.items():
|
||||
delete_registry_key(HKCR, key, recurse=settings['Recurse'])
|
||||
for key, settings in D7_HKCU_CLEANUP.items():
|
||||
delete_registry_key(HKCU, key, recurse=settings['Recurse'])
|
||||
for key, settings in D7_HKLM_CLEANUP.items():
|
||||
delete_registry_key(HKLM, key, recurse=settings['Recurse'])
|
||||
|
||||
# Temp items
|
||||
if os.path.exists(d7_path):
|
||||
if os.path.exists(d7_temp):
|
||||
shutil.rmtree(d7_temp)
|
||||
try:
|
||||
os.rmdir(d7_path)
|
||||
except OSError:
|
||||
# Just remove empty folders
|
||||
if o_entry.is_dir():
|
||||
try:
|
||||
os.rmdir(o_entry.path)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
# Restore default UAC settings
|
||||
if global_vars['OS']['Version'] == '10':
|
||||
write_registry_settings(UAC_DEFAULTS_WIN10, all_users=True)
|
||||
else:
|
||||
# Haven't checked Win8 settings, only applying minimum set
|
||||
write_registry_settings(UAC_DEFAULTS_WIN7, all_users=True)
|
||||
else:
|
||||
continue
|
||||
|
||||
# Move item
|
||||
shutil.move(o_entry.path, dest_path)
|
||||
|
||||
# Remove folder
|
||||
delete_empty_folders(entry.path)
|
||||
|
||||
# Registry Items
|
||||
for key, settings in D7_HKCR_CLEANUP.items():
|
||||
delete_registry_key(HKCR, key, recurse=settings['Recurse'])
|
||||
for key, settings in D7_HKCU_CLEANUP.items():
|
||||
delete_registry_key(HKCU, key, recurse=settings['Recurse'])
|
||||
for key, settings in D7_HKLM_CLEANUP.items():
|
||||
delete_registry_key(HKLM, key, recurse=settings['Recurse'])
|
||||
|
||||
# Temp items
|
||||
if os.path.exists(d7_path):
|
||||
if os.path.exists(d7_temp):
|
||||
shutil.rmtree(d7_temp)
|
||||
try:
|
||||
os.rmdir(d7_path)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
# Restore default UAC settings
|
||||
if global_vars['OS']['Version'] == '10':
|
||||
write_registry_settings(UAC_DEFAULTS_WIN10, all_users=True)
|
||||
else:
|
||||
# Haven't checked Win8 settings, only applying minimum set
|
||||
write_registry_settings(UAC_DEFAULTS_WIN7, all_users=True)
|
||||
|
||||
def cleanup_desktop():
|
||||
"""Move known backup files and reports into the ClientDir."""
|
||||
|
|
@ -206,44 +206,44 @@ def cleanup_desktop():
|
|||
|
||||
|
||||
def cleanup_emsisoft():
|
||||
"""Remove EmsisoftCmd files from drive root."""
|
||||
source_path = r'{}\EmsisoftCmd'.format(global_vars['Env']['SYSTEMDRIVE'])
|
||||
source_quarantine = r'{}\Quarantine'.format(source_path)
|
||||
"""Remove EmsisoftCmd files from drive root."""
|
||||
source_path = r'{}\EmsisoftCmd'.format(global_vars['Env']['SYSTEMDRIVE'])
|
||||
source_quarantine = r'{}\Quarantine'.format(source_path)
|
||||
|
||||
# Quarantine
|
||||
if os.path.exists(source_quarantine):
|
||||
os.makedirs(global_vars['QuarantineDir'], exist_ok=True)
|
||||
dest_name = r'{QuarantineDir}\Emsisoft_{Date-Time}'.format(
|
||||
**global_vars)
|
||||
dest_name = non_clobber_rename(dest_name)
|
||||
shutil.move(source_quarantine, dest_name)
|
||||
# Quarantine
|
||||
if os.path.exists(source_quarantine):
|
||||
os.makedirs(global_vars['QuarantineDir'], exist_ok=True)
|
||||
dest_name = r'{QuarantineDir}\Emsisoft_{Date-Time}'.format(
|
||||
**global_vars)
|
||||
dest_name = non_clobber_rename(dest_name)
|
||||
shutil.move(source_quarantine, dest_name)
|
||||
|
||||
# Remove program
|
||||
if os.path.exists(source_path):
|
||||
shutil.rmtree(source_path)
|
||||
# Remove program
|
||||
if os.path.exists(source_path):
|
||||
shutil.rmtree(source_path)
|
||||
|
||||
def cleanup_regbackups():
|
||||
"""Move d7ii regbackups into backup folder."""
|
||||
source_path = r'{}\Support\RegBackups'.format(
|
||||
global_vars['Env']['SYSTEMDRIVE'])
|
||||
"""Move d7ii regbackups into backup folder."""
|
||||
source_path = r'{}\Support\RegBackups'.format(
|
||||
global_vars['Env']['SYSTEMDRIVE'])
|
||||
|
||||
# Bail early
|
||||
if not os.path.exists(source_path):
|
||||
return
|
||||
# Bail early
|
||||
if not os.path.exists(source_path):
|
||||
return
|
||||
|
||||
# Make dest folder
|
||||
dest_dir = r'{BackupDir}\Registry\{Date}'.format(**global_vars)
|
||||
os.makedirs(dest_dir, exist_ok=True)
|
||||
# Make dest folder
|
||||
dest_dir = r'{BackupDir}\Registry\{Date}'.format(**global_vars)
|
||||
os.makedirs(dest_dir, exist_ok=True)
|
||||
|
||||
# Move to backup folder
|
||||
for entry in os.scandir(source_path):
|
||||
dest_path = r'{dest}\{name}'.format(dest=dest_dir, name=entry.name)
|
||||
dest_path = non_clobber_rename(dest_path)
|
||||
shutil.move(entry.path, dest_path)
|
||||
# Move to backup folder
|
||||
for entry in os.scandir(source_path):
|
||||
dest_path = r'{dest}\{name}'.format(dest=dest_dir, name=entry.name)
|
||||
dest_path = non_clobber_rename(dest_path)
|
||||
shutil.move(entry.path, dest_path)
|
||||
|
||||
# Delete source folders if empty
|
||||
delete_empty_folders(r'{}\Support'.format(
|
||||
global_vars['Env']['SYSTEMDRIVE']))
|
||||
# Delete source folders if empty
|
||||
delete_empty_folders(r'{}\Support'.format(
|
||||
global_vars['Env']['SYSTEMDRIVE']))
|
||||
|
||||
def delete_empty_folders(folder_path):
|
||||
"""Delete all empty folders in path (depth first)."""
|
||||
|
|
|
|||
|
|
@ -219,25 +219,25 @@ def disable_windows_telemetry():
|
|||
|
||||
|
||||
def enable_regback():
|
||||
"""Enable RegBack."""
|
||||
write_registry_settings(SETTINGS_REGBACK, all_users=True)
|
||||
"""Enable RegBack."""
|
||||
write_registry_settings(SETTINGS_REGBACK, all_users=True)
|
||||
|
||||
def enable_system_restore():
|
||||
"""Enable System Restore and set disk usage to 5%"""
|
||||
cmd = [
|
||||
'PowerShell',
|
||||
'-Command', 'Enable-ComputerRestore',
|
||||
'-Drive', '{}\\'.format(global_vars['Env']['SYSTEMDRIVE'])]
|
||||
run_program(cmd)
|
||||
"""Enable System Restore and set disk usage to 5%"""
|
||||
cmd = [
|
||||
'PowerShell',
|
||||
'-Command', 'Enable-ComputerRestore',
|
||||
'-Drive', '{}\\'.format(global_vars['Env']['SYSTEMDRIVE'])]
|
||||
run_program(cmd)
|
||||
|
||||
# Set disk usage
|
||||
cmd = [
|
||||
r'{}\System32\vssadmin.exe'.format(global_vars['Env']['SYSTEMROOT']),
|
||||
'resize', 'shadowstorage',
|
||||
'/on={}'.format(global_vars['Env']['SYSTEMDRIVE']),
|
||||
'/for={}'.format(global_vars['Env']['SYSTEMDRIVE']),
|
||||
'/maxsize=5%']
|
||||
run_program(cmd)
|
||||
# Set disk usage
|
||||
cmd = [
|
||||
r'{}\System32\vssadmin.exe'.format(global_vars['Env']['SYSTEMROOT']),
|
||||
'resize', 'shadowstorage',
|
||||
'/on={}'.format(global_vars['Env']['SYSTEMDRIVE']),
|
||||
'/for={}'.format(global_vars['Env']['SYSTEMDRIVE']),
|
||||
'/maxsize=5%']
|
||||
run_program(cmd)
|
||||
|
||||
def update_clock():
|
||||
"""Set Timezone and sync clock."""
|
||||
|
|
@ -305,35 +305,35 @@ def install_classicstart_skin():
|
|||
|
||||
|
||||
def install_eset_nod32_av(scan_pups=True):
|
||||
"""Install ESET NOD32 AV with custom config."""
|
||||
extract_item('ESETConfigs', silent=True)
|
||||
config_file = r'{BinDir}\ESETConfigs\{config_file}.xml'.format(
|
||||
config_file='eset-config' if scan_pups else 'eset-config-no-pup',
|
||||
**global_vars)
|
||||
"""Install ESET NOD32 AV with custom config."""
|
||||
extract_item('ESETConfigs', silent=True)
|
||||
config_file = r'{BinDir}\ESETConfigs\{config_file}.xml'.format(
|
||||
config_file='eset-config' if scan_pups else 'eset-config-no-pup',
|
||||
**global_vars)
|
||||
|
||||
# Apply user configuration
|
||||
write_registry_settings(SETTINGS_ESET, all_users=False)
|
||||
# Apply user configuration
|
||||
write_registry_settings(SETTINGS_ESET, all_users=False)
|
||||
|
||||
# Download
|
||||
result = try_and_print(message='Downloading Setup...', cs='Done',
|
||||
other_results=OTHER_RESULTS, function=download_generic,
|
||||
out_dir=global_vars['ClientDir'],
|
||||
out_name='eav_nt64.exe',
|
||||
source_url=SOURCE_URLS['ESET NOD32 AV'])
|
||||
installer = r'{ClientDir}\eav_nt64.exe'.format(**global_vars)
|
||||
if not result['CS']:
|
||||
raise GenericError('Failed to download ESET NOD32 AV')
|
||||
# Download
|
||||
result = try_and_print(message='Downloading Setup...', cs='Done',
|
||||
other_results=OTHER_RESULTS, function=download_generic,
|
||||
out_dir=global_vars['ClientDir'],
|
||||
out_name='eav_nt64.exe',
|
||||
source_url=SOURCE_URLS['ESET NOD32 AV'])
|
||||
installer = r'{ClientDir}\eav_nt64.exe'.format(**global_vars)
|
||||
if not result['CS']:
|
||||
raise GenericError('Failed to download ESET NOD32 AV')
|
||||
|
||||
# Install
|
||||
cmd = [installer,
|
||||
'--silent', '--accepteula', '--msi-property',
|
||||
'PRODUCTTYPE=eav', 'PRODUCT_LANG=1033', 'PRODUCT_LANG_CODE=en-US',
|
||||
'ADMINCFG="{}"'.format(config_file)]
|
||||
try_and_print(message='Installing ESET NOD32 AV...',
|
||||
other_results=OTHER_RESULTS, function=run_program, cmd=cmd)
|
||||
|
||||
# Delete installer
|
||||
remove_item(installer)
|
||||
# Install
|
||||
cmd = [installer,
|
||||
'--silent', '--accepteula', '--msi-property',
|
||||
'PRODUCTTYPE=eav', 'PRODUCT_LANG=1033', 'PRODUCT_LANG_CODE=en-US',
|
||||
'ADMINCFG="{}"'.format(config_file)]
|
||||
try_and_print(message='Installing ESET NOD32 AV...',
|
||||
other_results=OTHER_RESULTS, function=run_program, cmd=cmd)
|
||||
|
||||
# Delete installer
|
||||
remove_item(installer)
|
||||
|
||||
def install_firefox_extensions():
|
||||
"""Install Firefox extensions for all users."""
|
||||
|
|
|
|||
|
|
@ -282,44 +282,44 @@ def update_fastcopy():
|
|||
|
||||
|
||||
def update_linux_reader():
|
||||
# Stop running processes
|
||||
for exe in ['LinuxReader.exe', 'LinuxReader64.exe']:
|
||||
kill_process(exe)
|
||||
# Stop running processes
|
||||
for exe in ['LinuxReader.exe', 'LinuxReader64.exe']:
|
||||
kill_process(exe)
|
||||
|
||||
# Remove existing folders
|
||||
remove_from_kit('LinuxReader')
|
||||
# Remove existing folders
|
||||
remove_from_kit('LinuxReader')
|
||||
|
||||
# Prep
|
||||
install_dir = r'{}\LinuxReaderTemp'.format(global_vars['TmpDir'])
|
||||
dest = r'{}\LinuxReader'.format(global_vars['CBinDir'])
|
||||
uninstaller = None
|
||||
# Prep
|
||||
install_dir = r'{}\LinuxReaderTemp'.format(global_vars['TmpDir'])
|
||||
dest = r'{}\LinuxReader'.format(global_vars['CBinDir'])
|
||||
uninstaller = None
|
||||
|
||||
# Download
|
||||
download_to_temp('LinuxReader.exe', SOURCE_URLS['Linux Reader'])
|
||||
# Download
|
||||
download_to_temp('LinuxReader.exe', SOURCE_URLS['Linux Reader'])
|
||||
|
||||
# Install to temp
|
||||
cmd = [
|
||||
r'{}\LinuxReader.exe'.format(global_vars['TmpDir']),
|
||||
'/S',
|
||||
'/D={}'.format(install_dir)]
|
||||
# Install to temp
|
||||
cmd = [
|
||||
r'{}\LinuxReader.exe'.format(global_vars['TmpDir']),
|
||||
'/S',
|
||||
'/D={}'.format(install_dir)]
|
||||
run_program(cmd)
|
||||
|
||||
# Copy files
|
||||
shutil.copytree(install_dir, dest)
|
||||
for item in os.scandir(dest):
|
||||
r = re.search(r'^uninstall.*(dat|exe)$', item.name, re.IGNORECASE)
|
||||
if r:
|
||||
if 'exe' in item.name:
|
||||
uninstaller = r'{}\{}'.format(install_dir, item.name)
|
||||
remove_item(item.path)
|
||||
|
||||
# Uninstall from temp
|
||||
if uninstaller:
|
||||
cmd = [uninstaller, '/S']
|
||||
run_program(cmd)
|
||||
|
||||
# Copy files
|
||||
shutil.copytree(install_dir, dest)
|
||||
for item in os.scandir(dest):
|
||||
r = re.search(r'^uninstall.*(dat|exe)$', item.name, re.IGNORECASE)
|
||||
if r:
|
||||
if 'exe' in item.name:
|
||||
uninstaller = r'{}\{}'.format(install_dir, item.name)
|
||||
remove_item(item.path)
|
||||
|
||||
# Uninstall from temp
|
||||
if uninstaller:
|
||||
cmd = [uninstaller, '/S']
|
||||
run_program(cmd)
|
||||
|
||||
# Cleanup
|
||||
remove_from_temp('LinuxReader.exe')
|
||||
# Cleanup
|
||||
remove_from_temp('LinuxReader.exe')
|
||||
|
||||
def update_wimlib():
|
||||
# Stop running processes
|
||||
|
|
@ -473,44 +473,44 @@ def update_erunt():
|
|||
|
||||
|
||||
def update_furmark():
|
||||
# Stop running processes
|
||||
for exe in ['cpuburner.exe', 'FurMark.exe', 'gpushark.exe', 'gpuz.exe']:
|
||||
kill_process(exe)
|
||||
# Stop running processes
|
||||
for exe in ['cpuburner.exe', 'FurMark.exe', 'gpushark.exe', 'gpuz.exe']:
|
||||
kill_process(exe)
|
||||
|
||||
# Remove existing folders
|
||||
remove_from_kit('FurMark')
|
||||
# Remove existing folders
|
||||
remove_from_kit('FurMark')
|
||||
|
||||
# Prep
|
||||
install_dir = r'{}\FurMarkTemp'.format(global_vars['TmpDir'])
|
||||
dest = r'{}\FurMark'.format(global_vars['CBinDir'])
|
||||
uninstaller = None
|
||||
# Prep
|
||||
install_dir = r'{}\FurMarkTemp'.format(global_vars['TmpDir'])
|
||||
dest = r'{}\FurMark'.format(global_vars['CBinDir'])
|
||||
uninstaller = None
|
||||
|
||||
# Download
|
||||
download_to_temp('furmark_setup.exe', SOURCE_URLS['FurMark'])
|
||||
# Download
|
||||
download_to_temp('furmark_setup.exe', SOURCE_URLS['FurMark'])
|
||||
|
||||
# Install to temp
|
||||
cmd = [
|
||||
r'{}\furmark_setup.exe'.format(global_vars['TmpDir']),
|
||||
'/DIR={}'.format(install_dir),
|
||||
'/SILENT']
|
||||
# Install to temp
|
||||
cmd = [
|
||||
r'{}\furmark_setup.exe'.format(global_vars['TmpDir']),
|
||||
'/DIR={}'.format(install_dir),
|
||||
'/SILENT']
|
||||
run_program(cmd)
|
||||
|
||||
# Copy files
|
||||
shutil.copytree(install_dir, dest)
|
||||
for item in os.scandir(dest):
|
||||
r = re.search(r'^unins\d+\.(dat|exe)$', item.name, re.IGNORECASE)
|
||||
if r:
|
||||
if 'exe' in item.name:
|
||||
uninstaller = r'{}\{}'.format(install_dir, item.name)
|
||||
remove_item(item.path)
|
||||
|
||||
# Uninstall from temp
|
||||
if uninstaller:
|
||||
cmd = [uninstaller, '/SILENT']
|
||||
run_program(cmd)
|
||||
|
||||
# Copy files
|
||||
shutil.copytree(install_dir, dest)
|
||||
for item in os.scandir(dest):
|
||||
r = re.search(r'^unins\d+\.(dat|exe)$', item.name, re.IGNORECASE)
|
||||
if r:
|
||||
if 'exe' in item.name:
|
||||
uninstaller = r'{}\{}'.format(install_dir, item.name)
|
||||
remove_item(item.path)
|
||||
|
||||
# Uninstall from temp
|
||||
if uninstaller:
|
||||
cmd = [uninstaller, '/SILENT']
|
||||
run_program(cmd)
|
||||
|
||||
# Cleanup
|
||||
remove_from_temp('furmark_setup.exe')
|
||||
# Cleanup
|
||||
remove_from_temp('furmark_setup.exe')
|
||||
|
||||
def update_hitmanpro():
|
||||
# Stop running processes
|
||||
|
|
@ -713,11 +713,11 @@ def update_adobe_reader_dc():
|
|||
|
||||
|
||||
def update_eset_config():
|
||||
"""Copy config files to .cbin before compress_item"""
|
||||
dest = r'{}\ESETConfigs'.format(global_vars['CBinDir'])
|
||||
include_path = r'{}\_include\ESETConfigs'.format(global_vars['CBinDir'])
|
||||
if os.path.exists(include_path):
|
||||
shutil.copytree(include_path, dest)
|
||||
"""Copy config files to .cbin before compress_item"""
|
||||
dest = r'{}\ESETConfigs'.format(global_vars['CBinDir'])
|
||||
include_path = r'{}\_include\ESETConfigs'.format(global_vars['CBinDir'])
|
||||
if os.path.exists(include_path):
|
||||
shutil.copytree(include_path, dest)
|
||||
|
||||
def update_macs_fan_control():
|
||||
# Prep
|
||||
|
|
@ -935,23 +935,23 @@ def update_putty():
|
|||
|
||||
|
||||
def update_shutup10():
|
||||
# Stop running processes
|
||||
kill_process('OOSU10.exe')
|
||||
# Stop running processes
|
||||
kill_process('OOSU10.exe')
|
||||
|
||||
# Remove existing folders
|
||||
remove_from_kit('ShutUp10')
|
||||
# Remove existing folders
|
||||
remove_from_kit('ShutUp10')
|
||||
|
||||
# Copy settings
|
||||
dest = r'{}\ShutUp10'.format(global_vars['CBinDir'])
|
||||
include_path = r'{}\_include\ShutUp10'.format(global_vars['CBinDir'])
|
||||
if os.path.exists(include_path):
|
||||
shutil.copytree(include_path, dest)
|
||||
# Copy settings
|
||||
dest = r'{}\ShutUp10'.format(global_vars['CBinDir'])
|
||||
include_path = r'{}\_include\ShutUp10'.format(global_vars['CBinDir'])
|
||||
if os.path.exists(include_path):
|
||||
shutil.copytree(include_path, dest)
|
||||
|
||||
# Download
|
||||
download_generic(
|
||||
r'{}\ShutUp10'.format(global_vars['CBinDir']),
|
||||
'OOSU10.exe',
|
||||
SOURCE_URLS['ShutUp10'])
|
||||
# Download
|
||||
download_generic(
|
||||
r'{}\ShutUp10'.format(global_vars['CBinDir']),
|
||||
'OOSU10.exe',
|
||||
SOURCE_URLS['ShutUp10'])
|
||||
|
||||
def update_wiztree():
|
||||
# Stop running processes
|
||||
|
|
@ -1044,17 +1044,17 @@ def update_adwcleaner():
|
|||
|
||||
|
||||
def update_eset_online_scanner():
|
||||
# Stop running processes
|
||||
kill_process('ESET.exe')
|
||||
# Stop running processes
|
||||
kill_process('ESET.exe')
|
||||
|
||||
# Remove existing folders
|
||||
remove_from_kit('ESET')
|
||||
# Remove existing folders
|
||||
remove_from_kit('ESET')
|
||||
|
||||
# Download
|
||||
download_generic(
|
||||
r'{}\ESET'.format(global_vars['CBinDir']),
|
||||
'ESET.exe',
|
||||
SOURCE_URLS['ESET Online Scanner'])
|
||||
# Download
|
||||
download_generic(
|
||||
r'{}\ESET'.format(global_vars['CBinDir']),
|
||||
'ESET.exe',
|
||||
SOURCE_URLS['ESET Online Scanner'])
|
||||
|
||||
def update_kvrt():
|
||||
# Stop running processes
|
||||
|
|
@ -1100,24 +1100,24 @@ def update_tdsskiller():
|
|||
|
||||
|
||||
def update_winaiorepair():
|
||||
# Stop running processes
|
||||
kill_process('Repair_Windows.exe')
|
||||
# Stop running processes
|
||||
kill_process('Repair_Windows.exe')
|
||||
|
||||
# Download
|
||||
download_to_temp('winaio.zip', SOURCE_URLS['WinAIO Repair'])
|
||||
# Download
|
||||
download_to_temp('winaio.zip', SOURCE_URLS['WinAIO Repair'])
|
||||
|
||||
# Extract
|
||||
extract_temp_to_cbin('winaio.zip', 'WinAIORepair')
|
||||
dest = r'{}\WinAIORepair'.format(global_vars['CBinDir'])
|
||||
for item in os.scandir(r'{}\Tweaking.com - Windows Repair'.format(dest)):
|
||||
dest_item = '{}\{}'.format(dest, item.name)
|
||||
if not os.path.exists(dest_item):
|
||||
shutil.move(item.path, dest_item)
|
||||
shutil.rmtree(
|
||||
r'{}\WinAIORepair\Tweaking.com - Windows Repair'.format(global_vars['CBinDir']))
|
||||
# Extract
|
||||
extract_temp_to_cbin('winaio.zip', 'WinAIORepair')
|
||||
dest = r'{}\WinAIORepair'.format(global_vars['CBinDir'])
|
||||
for item in os.scandir(r'{}\Tweaking.com - Windows Repair'.format(dest)):
|
||||
dest_item = '{}\{}'.format(dest, item.name)
|
||||
if not os.path.exists(dest_item):
|
||||
shutil.move(item.path, dest_item)
|
||||
shutil.rmtree(
|
||||
r'{}\WinAIORepair\Tweaking.com - Windows Repair'.format(global_vars['CBinDir']))
|
||||
|
||||
# Cleanup
|
||||
remove_from_temp('winaio.zip')
|
||||
# Cleanup
|
||||
remove_from_temp('winaio.zip')
|
||||
|
||||
|
||||
# Uninstallers
|
||||
|
|
|
|||
Loading…
Reference in a new issue