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