Add WinAIO Repair

This commit is contained in:
2Shirt 2018-08-19 18:09:39 -07:00
parent 2301c89b8c
commit 33d1f42002
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
5 changed files with 147 additions and 116 deletions

View file

@ -28,7 +28,7 @@ def compress_item(item):
wd = os.path.abspath(r'{}\{}'.format(wd, os.path.pardir)) wd = os.path.abspath(r'{}\{}'.format(wd, os.path.pardir))
include_str = item.name include_str = item.name
os.chdir(wd) os.chdir(wd)
# Compress # Compress
cmd = [ cmd = [
global_vars['Tools']['SevenZip'], global_vars['Tools']['SevenZip'],
@ -38,7 +38,7 @@ def compress_item(item):
include_str, include_str,
] ]
run_program(cmd) run_program(cmd)
# Done # Done
os.chdir(prev_dir) os.chdir(prev_dir)
@ -96,7 +96,7 @@ def generate_launcher(section, name, options):
dest = global_vars['BaseDir'] dest = global_vars['BaseDir']
full_path = r'{}\{}.cmd'.format(dest, name) full_path = r'{}\{}.cmd'.format(dest, name)
template = r'{}\Scripts\Launcher_Template.cmd'.format(global_vars['BinDir']) template = r'{}\Scripts\Launcher_Template.cmd'.format(global_vars['BinDir'])
# Format options # Format options
f_options = {} f_options = {}
for opt in options.keys(): for opt in options.keys():
@ -106,7 +106,7 @@ def generate_launcher(section, name, options):
elif re.search(r'^L_\w+', opt, re.IGNORECASE): elif re.search(r'^L_\w+', opt, re.IGNORECASE):
new_opt = 'set {}='.format(opt) new_opt = 'set {}='.format(opt)
f_options[new_opt] = ['set {}={}'.format(opt, options[opt])] f_options[new_opt] = ['set {}={}'.format(opt, options[opt])]
# Read template and update using f_options # Read template and update using f_options
out_text = [] out_text = []
with open(template, 'r') as f: with open(template, 'r') as f:
@ -118,7 +118,7 @@ def generate_launcher(section, name, options):
out_text.extend(f_options[line]) out_text.extend(f_options[line])
else: else:
out_text.append(line) out_text.append(line)
# Write file # Write file
os.makedirs(dest, exist_ok=True) os.makedirs(dest, exist_ok=True)
with open(full_path, 'w') as f: with open(full_path, 'w') as f:
@ -172,7 +172,7 @@ def scan_for_net_installers(server, family_name, min_year):
"""Scan network shares for installers.""" """Scan network shares for installers."""
if not server['Mounted']: if not server['Mounted']:
mount_network_share(server) mount_network_share(server)
if server['Mounted']: if server['Mounted']:
for year in os.scandir(r'\\{IP}\{Share}'.format(**server)): for year in os.scandir(r'\\{IP}\{Share}'.format(**server)):
try: try:
@ -204,13 +204,13 @@ def update_testdisk():
for exe in ['fidentify_win.exe', 'photorec_win.exe', for exe in ['fidentify_win.exe', 'photorec_win.exe',
'qphotorec_win.exe', 'testdisk_win.exe']: 'qphotorec_win.exe', 'testdisk_win.exe']:
kill_process(exe) kill_process(exe)
# Remove existing folders # Remove existing folders
remove_from_kit('TestDisk') remove_from_kit('TestDisk')
# Download # Download
download_to_temp('testdisk_wip.zip', SOURCE_URLS['TestDisk']) download_to_temp('testdisk_wip.zip', SOURCE_URLS['TestDisk'])
# Extract files # Extract files
extract_temp_to_cbin('testdisk_wip.zip', 'TestDisk') extract_temp_to_cbin('testdisk_wip.zip', 'TestDisk')
dest = r'{}\TestDisk'.format(global_vars['CBinDir']) dest = r'{}\TestDisk'.format(global_vars['CBinDir'])
@ -220,7 +220,7 @@ def update_testdisk():
shutil.move(item.path, dest_item) shutil.move(item.path, dest_item)
shutil.rmtree( shutil.rmtree(
r'{}\TestDisk\testdisk-7.1-WIP'.format(global_vars['CBinDir'])) r'{}\TestDisk\testdisk-7.1-WIP'.format(global_vars['CBinDir']))
# Cleanup # Cleanup
remove_from_temp('testdisk_wip.zip') remove_from_temp('testdisk_wip.zip')
@ -230,21 +230,21 @@ def update_fastcopy():
# Stop running processes # Stop running processes
for process in ['FastCopy.exe', 'FastCopy64.exe']: for process in ['FastCopy.exe', 'FastCopy64.exe']:
kill_process(process) kill_process(process)
# Remove existing folders # Remove existing folders
remove_from_kit('FastCopy') remove_from_kit('FastCopy')
# Download # Download
download_to_temp('FastCopy32.zip', SOURCE_URLS['FastCopy32']) download_to_temp('FastCopy32.zip', SOURCE_URLS['FastCopy32'])
download_to_temp('FastCopy64.zip', SOURCE_URLS['FastCopy64']) download_to_temp('FastCopy64.zip', SOURCE_URLS['FastCopy64'])
# Extract # Extract
extract_temp_to_bin('FastCopy64.zip', 'FastCopy', sz_args=['FastCopy.exe']) extract_temp_to_bin('FastCopy64.zip', 'FastCopy', sz_args=['FastCopy.exe'])
shutil.move( shutil.move(
r'{}\FastCopy\FastCopy.exe'.format(global_vars['BinDir']), r'{}\FastCopy\FastCopy.exe'.format(global_vars['BinDir']),
r'{}\FastCopy\FastCopy64.exe'.format(global_vars['BinDir'])) r'{}\FastCopy\FastCopy64.exe'.format(global_vars['BinDir']))
extract_temp_to_bin('FastCopy32.zip', 'FastCopy', sz_args=[r'-x!setup.exe', r'-x!*.dll']) extract_temp_to_bin('FastCopy32.zip', 'FastCopy', sz_args=[r'-x!setup.exe', r'-x!*.dll'])
# Cleanup # Cleanup
remove_from_temp('FastCopy32.zip') remove_from_temp('FastCopy32.zip')
remove_from_temp('FastCopy64.zip') remove_from_temp('FastCopy64.zip')
@ -252,14 +252,14 @@ def update_fastcopy():
def update_wimlib(): def update_wimlib():
# Stop running processes # Stop running processes
kill_process('wimlib-imagex.exe') kill_process('wimlib-imagex.exe')
# Remove existing folders # Remove existing folders
remove_from_kit('wimlib') remove_from_kit('wimlib')
# Download # Download
download_to_temp('wimlib32.zip', SOURCE_URLS['wimlib32']) download_to_temp('wimlib32.zip', SOURCE_URLS['wimlib32'])
download_to_temp('wimlib64.zip', SOURCE_URLS['wimlib64']) download_to_temp('wimlib64.zip', SOURCE_URLS['wimlib64'])
# Extract # Extract
extract_generic( extract_generic(
r'{}\wimlib32.zip'.format(global_vars['TmpDir']), r'{}\wimlib32.zip'.format(global_vars['TmpDir']),
@ -267,7 +267,7 @@ def update_wimlib():
extract_generic( extract_generic(
r'{}\wimlib64.zip'.format(global_vars['TmpDir']), r'{}\wimlib64.zip'.format(global_vars['TmpDir']),
r'{}\wimlib\x64'.format(global_vars['CBinDir'])) r'{}\wimlib\x64'.format(global_vars['CBinDir']))
# Cleanup # Cleanup
remove_from_temp('wimlib32.zip') remove_from_temp('wimlib32.zip')
remove_from_temp('wimlib64.zip') remove_from_temp('wimlib64.zip')
@ -275,16 +275,16 @@ def update_wimlib():
def update_xyplorer(): def update_xyplorer():
# Stop running processes # Stop running processes
kill_process('XYplorerFree.exe') kill_process('XYplorerFree.exe')
# Remove existing folders # Remove existing folders
remove_from_kit('XYplorerFree') remove_from_kit('XYplorerFree')
# Download # Download
download_to_temp('xyplorer_free.zip', SOURCE_URLS['XYplorerFree']) download_to_temp('xyplorer_free.zip', SOURCE_URLS['XYplorerFree'])
# Extract files # Extract files
extract_temp_to_cbin('xyplorer_free.zip', 'XYplorerFree') extract_temp_to_cbin('xyplorer_free.zip', 'XYplorerFree')
# Cleanup # Cleanup
remove_from_temp('xyplorer_free.zip') remove_from_temp('xyplorer_free.zip')
@ -292,16 +292,16 @@ def update_xyplorer():
def update_aida64(): def update_aida64():
# Stop running processes # Stop running processes
kill_process('notepadplusplus.exe') kill_process('notepadplusplus.exe')
# Remove existing folders # Remove existing folders
remove_from_kit('AIDA64') remove_from_kit('AIDA64')
# Download # Download
download_to_temp('aida64.zip', SOURCE_URLS['AIDA64']) download_to_temp('aida64.zip', SOURCE_URLS['AIDA64'])
# Extract files # Extract files
extract_temp_to_cbin('aida64.zip', 'AIDA64') extract_temp_to_cbin('aida64.zip', 'AIDA64')
# Cleanup # Cleanup
remove_from_temp('aida64.zip') remove_from_temp('aida64.zip')
@ -309,37 +309,37 @@ def update_autoruns():
# Stop running processes # Stop running processes
kill_process('Autoruns.exe') kill_process('Autoruns.exe')
kill_process('Autoruns64.exe') kill_process('Autoruns64.exe')
# Remove existing folders # Remove existing folders
remove_from_kit('Autoruns') remove_from_kit('Autoruns')
# Download # Download
download_to_temp('Autoruns.zip', SOURCE_URLS['Autoruns']) download_to_temp('Autoruns.zip', SOURCE_URLS['Autoruns'])
# Extract files # Extract files
extract_temp_to_cbin('Autoruns.zip', 'Autoruns') extract_temp_to_cbin('Autoruns.zip', 'Autoruns')
# Cleanup # Cleanup
remove_from_temp('Autoruns.zip') remove_from_temp('Autoruns.zip')
def update_bleachbit(): def update_bleachbit():
# Stop running processes # Stop running processes
kill_process('bleachbit.exe') kill_process('bleachbit.exe')
# Remove existing folders # Remove existing folders
remove_from_kit('BleachBit') remove_from_kit('BleachBit')
# Download # Download
download_to_temp('bleachbit.zip', SOURCE_URLS['BleachBit']) download_to_temp('bleachbit.zip', SOURCE_URLS['BleachBit'])
download_to_temp('Winapp2.zip', SOURCE_URLS['Winapp2']) download_to_temp('Winapp2.zip', SOURCE_URLS['Winapp2'])
# Extract files # Extract files
extract_temp_to_cbin('bleachbit.zip', 'BleachBit') extract_temp_to_cbin('bleachbit.zip', 'BleachBit')
extract_generic( extract_generic(
r'{}\Winapp2.zip'.format(global_vars['TmpDir']), r'{}\Winapp2.zip'.format(global_vars['TmpDir']),
r'{}\BleachBit\cleaners'.format(global_vars['CBinDir']), r'{}\BleachBit\cleaners'.format(global_vars['CBinDir']),
mode='e', sz_args=[r'Winapp2-master\Non-CCleaner\Winapp2.ini']) mode='e', sz_args=[r'Winapp2-master\Non-CCleaner\Winapp2.ini'])
# Move files into place # Move files into place
dest = r'{}\BleachBit'.format(global_vars['CBinDir']) dest = r'{}\BleachBit'.format(global_vars['CBinDir'])
for item in os.scandir(r'{}\BleachBit-Portable'.format(dest)): for item in os.scandir(r'{}\BleachBit-Portable'.format(dest)):
@ -348,7 +348,7 @@ def update_bleachbit():
shutil.move(item.path, dest_item) shutil.move(item.path, dest_item)
shutil.rmtree( shutil.rmtree(
r'{}\BleachBit\BleachBit-Portable'.format(global_vars['CBinDir'])) r'{}\BleachBit\BleachBit-Portable'.format(global_vars['CBinDir']))
# Cleanup # Cleanup
remove_from_temp('bleachbit.zip') remove_from_temp('bleachbit.zip')
remove_from_temp('Winapp2.zip') remove_from_temp('Winapp2.zip')
@ -357,21 +357,21 @@ def update_bluescreenview():
# Stop running processes # Stop running processes
for exe in ['BlueScreenView.exe', 'BlueScreenView64.exe']: for exe in ['BlueScreenView.exe', 'BlueScreenView64.exe']:
kill_process(exe) kill_process(exe)
# Remove existing folders # Remove existing folders
remove_from_kit('BlueScreenView') remove_from_kit('BlueScreenView')
# Download # Download
download_to_temp('bluescreenview32.zip', SOURCE_URLS['BlueScreenView32']) download_to_temp('bluescreenview32.zip', SOURCE_URLS['BlueScreenView32'])
download_to_temp('bluescreenview64.zip', SOURCE_URLS['BlueScreenView64']) download_to_temp('bluescreenview64.zip', SOURCE_URLS['BlueScreenView64'])
# Extract files # Extract files
extract_temp_to_cbin('bluescreenview64.zip', 'BlueScreenView', sz_args=['BlueScreenView.exe']) extract_temp_to_cbin('bluescreenview64.zip', 'BlueScreenView', sz_args=['BlueScreenView.exe'])
shutil.move( shutil.move(
r'{}\BlueScreenView\BlueScreenView.exe'.format(global_vars['CBinDir']), r'{}\BlueScreenView\BlueScreenView.exe'.format(global_vars['CBinDir']),
r'{}\BlueScreenView\BlueScreenView64.exe'.format(global_vars['CBinDir'])) r'{}\BlueScreenView\BlueScreenView64.exe'.format(global_vars['CBinDir']))
extract_temp_to_cbin('bluescreenview32.zip', 'BlueScreenView') extract_temp_to_cbin('bluescreenview32.zip', 'BlueScreenView')
# Cleanup # Cleanup
remove_from_temp('bluescreenview32.zip') remove_from_temp('bluescreenview32.zip')
remove_from_temp('bluescreenview64.zip') remove_from_temp('bluescreenview64.zip')
@ -379,16 +379,16 @@ def update_bluescreenview():
def update_erunt(): def update_erunt():
# Stop running processes # Stop running processes
kill_process('ERUNT.EXE') kill_process('ERUNT.EXE')
# Remove existing folders # Remove existing folders
remove_from_kit('ERUNT') remove_from_kit('ERUNT')
# Download # Download
download_to_temp('erunt.zip', SOURCE_URLS['ERUNT']) download_to_temp('erunt.zip', SOURCE_URLS['ERUNT'])
# Extract files # Extract files
extract_temp_to_cbin('erunt.zip', 'ERUNT') extract_temp_to_cbin('erunt.zip', 'ERUNT')
# Cleanup # Cleanup
remove_from_temp('erunt.zip') remove_from_temp('erunt.zip')
@ -396,10 +396,10 @@ def update_hitmanpro():
# Stop running processes # Stop running processes
for exe in ['HitmanPro.exe', 'HitmanPro64.exe']: for exe in ['HitmanPro.exe', 'HitmanPro64.exe']:
kill_process(exe) kill_process(exe)
# Remove existing folders # Remove existing folders
remove_from_kit('HitmanPro') remove_from_kit('HitmanPro')
# Download # Download
dest = r'{}\HitmanPro'.format(global_vars['CBinDir']) dest = r'{}\HitmanPro'.format(global_vars['CBinDir'])
download_generic(dest, 'HitmanPro.exe', SOURCE_URLS['HitmanPro32']) download_generic(dest, 'HitmanPro.exe', SOURCE_URLS['HitmanPro32'])
@ -410,13 +410,13 @@ def update_hwinfo():
# Stop running processes # Stop running processes
for exe in ['HWiNFO32.exe', 'HWiNFO64.exe']: for exe in ['HWiNFO32.exe', 'HWiNFO64.exe']:
kill_process(exe) kill_process(exe)
# Download # Download
download_to_temp('HWiNFO.zip', SOURCE_URLS['HWiNFO']) download_to_temp('HWiNFO.zip', SOURCE_URLS['HWiNFO'])
# Extract files # Extract files
extract_temp_to_bin('HWiNFO.zip', 'HWiNFO') extract_temp_to_bin('HWiNFO.zip', 'HWiNFO')
# Cleanup # Cleanup
remove_from_temp('HWiNFO.zip') remove_from_temp('HWiNFO.zip')
@ -424,21 +424,21 @@ def update_produkey():
# Stop running processes # Stop running processes
for exe in ['ProduKey.exe', 'ProduKey64.exe']: for exe in ['ProduKey.exe', 'ProduKey64.exe']:
kill_process(exe) kill_process(exe)
# Remove existing folders # Remove existing folders
remove_from_kit('ProduKey') remove_from_kit('ProduKey')
# Download # Download
download_to_temp('produkey32.zip', SOURCE_URLS['ProduKey32']) download_to_temp('produkey32.zip', SOURCE_URLS['ProduKey32'])
download_to_temp('produkey64.zip', SOURCE_URLS['ProduKey64']) download_to_temp('produkey64.zip', SOURCE_URLS['ProduKey64'])
# Extract files # Extract files
extract_temp_to_cbin('produkey64.zip', 'ProduKey', sz_args=['ProduKey.exe']) extract_temp_to_cbin('produkey64.zip', 'ProduKey', sz_args=['ProduKey.exe'])
shutil.move( shutil.move(
r'{}\ProduKey\ProduKey.exe'.format(global_vars['CBinDir']), r'{}\ProduKey\ProduKey.exe'.format(global_vars['CBinDir']),
r'{}\ProduKey\ProduKey64.exe'.format(global_vars['CBinDir'])) r'{}\ProduKey\ProduKey64.exe'.format(global_vars['CBinDir']))
extract_temp_to_cbin('produkey32.zip', 'ProduKey') extract_temp_to_cbin('produkey32.zip', 'ProduKey')
# Cleanup # Cleanup
remove_from_temp('produkey32.zip') remove_from_temp('produkey32.zip')
remove_from_temp('produkey64.zip') remove_from_temp('produkey64.zip')
@ -447,14 +447,14 @@ def update_produkey():
def update_intel_rst(): def update_intel_rst():
# Remove existing folders # Remove existing folders
remove_from_kit('Intel RST') remove_from_kit('Intel RST')
# Prep # Prep
dest = r'{}\_Drivers\Intel RST'.format(global_vars['CBinDir']) dest = r'{}\_Drivers\Intel RST'.format(global_vars['CBinDir'])
include_path = r'{}\_include\_Drivers\Intel RST'.format( include_path = r'{}\_include\_Drivers\Intel RST'.format(
global_vars['CBinDir']) 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
for name, url in RST_SOURCES.items(): for name, url in RST_SOURCES.items():
download_generic(dest, name, url) download_generic(dest, name, url)
@ -462,7 +462,7 @@ def update_intel_rst():
def update_intel_ssd_toolbox(): def update_intel_ssd_toolbox():
# Remove existing folders # Remove existing folders
remove_from_kit('Intel SSD Toolbox.exe') remove_from_kit('Intel SSD Toolbox.exe')
# Download # Download
download_generic( download_generic(
r'{}\_Drivers\Intel SSD Toolbox'.format(global_vars['CBinDir']), r'{}\_Drivers\Intel SSD Toolbox'.format(global_vars['CBinDir']),
@ -472,7 +472,7 @@ def update_intel_ssd_toolbox():
def update_samsung_magician(): def update_samsung_magician():
# Remove existing folders # Remove existing folders
remove_from_kit('Samsung Magician.exe') remove_from_kit('Samsung Magician.exe')
# Download # Download
download_generic( download_generic(
r'{}\_Drivers\Samsung Magician'.format(global_vars['CBinDir']), r'{}\_Drivers\Samsung Magician'.format(global_vars['CBinDir']),
@ -486,7 +486,7 @@ def update_sdi_origin():
aria_dest = r'{}\aria2'.format(global_vars['TmpDir']) aria_dest = r'{}\aria2'.format(global_vars['TmpDir'])
aria = r'{}\aria2c.exe'.format(aria_dest) aria = r'{}\aria2c.exe'.format(aria_dest)
extract_generic(aria_source, aria_dest, mode='e') extract_generic(aria_source, aria_dest, mode='e')
# Prep for torrent download # Prep for torrent download
download_to_temp('sdio.torrent', SOURCE_URLS['SDIO Torrent']) download_to_temp('sdio.torrent', SOURCE_URLS['SDIO Torrent'])
sdio_torrent = r'{}\sdio.torrent'.format(global_vars['TmpDir']) sdio_torrent = r'{}\sdio.torrent'.format(global_vars['TmpDir'])
@ -497,7 +497,7 @@ def update_sdi_origin():
if r and not re.search(r'(\.(bat|inf)|Video|Server|Printer|XP)', line, re.IGNORECASE): if r and not re.search(r'(\.(bat|inf)|Video|Server|Printer|XP)', line, re.IGNORECASE):
indexes.append(int(r.group(1))) indexes.append(int(r.group(1)))
indexes = [str(i) for i in sorted(indexes)] indexes = [str(i) for i in sorted(indexes)]
# Download SDI Origin # Download SDI Origin
cmd = [ cmd = [
aria, aria,
@ -510,13 +510,13 @@ def update_sdi_origin():
run_program(cmd, pipe=False, check=False, shell=True) run_program(cmd, pipe=False, check=False, shell=True)
sleep(1) sleep(1)
wait_for_process('aria2c') wait_for_process('aria2c')
# Download SDI Origin extra themes # Download SDI Origin extra themes
download_to_temp('sdio_themes.zip', SOURCE_URLS['SDIO Themes']) download_to_temp('sdio_themes.zip', SOURCE_URLS['SDIO Themes'])
theme_source = r'{}\sdio_themes.zip'.format(global_vars['TmpDir']) theme_source = r'{}\sdio_themes.zip'.format(global_vars['TmpDir'])
theme_dest = r'{}\SDIO_Update\tools\SDI\themes'.format(aria_dest) theme_dest = r'{}\SDIO_Update\tools\SDI\themes'.format(aria_dest)
extract_generic(theme_source, theme_dest) extract_generic(theme_source, theme_dest)
# Move files into place # Move files into place
for item in os.scandir(r'{}\SDIO_Update'.format(aria_dest)): for item in os.scandir(r'{}\SDIO_Update'.format(aria_dest)):
dest_item = '{}\_Drivers\SDIO\{}'.format( dest_item = '{}\_Drivers\SDIO\{}'.format(
@ -528,7 +528,7 @@ def update_sdi_origin():
if (not os.path.exists(dest_item) if (not os.path.exists(dest_item)
and not re.search(r'\.(inf|bat)$', item.name, re.IGNORECASE)): and not re.search(r'\.(inf|bat)$', item.name, re.IGNORECASE)):
shutil.move(item.path, dest_item) shutil.move(item.path, dest_item)
# Cleanup # Cleanup
remove_from_temp('aria2') remove_from_temp('aria2')
remove_from_temp('aria2.zip') remove_from_temp('aria2.zip')
@ -540,13 +540,13 @@ def update_adobe_reader_dc():
# Prep # Prep
dest = r'{}\Installers\Extras\Office'.format( dest = r'{}\Installers\Extras\Office'.format(
global_vars['BaseDir']) global_vars['BaseDir'])
# Remove existing installer # Remove existing installer
try: try:
os.remove(r'{}\Adobe Reader DC.exe'.format(dest)) os.remove(r'{}\Adobe Reader DC.exe'.format(dest))
except FileNotFoundError: except FileNotFoundError:
pass pass
# Download # Download
download_generic( download_generic(
dest, 'Adobe Reader DC.exe', SOURCE_URLS['Adobe Reader DC']) dest, 'Adobe Reader DC.exe', SOURCE_URLS['Adobe Reader DC'])
@ -561,13 +561,13 @@ def update_eset_config():
def update_office(): def update_office():
# Remove existing folders # Remove existing folders
remove_from_kit('_Office') remove_from_kit('_Office')
# Prep # Prep
dest = r'{}\_Office'.format(global_vars['CBinDir']) dest = r'{}\_Office'.format(global_vars['CBinDir'])
include_path = r'{}\_include\_Office'.format(global_vars['CBinDir']) include_path = r'{}\_include\_Office'.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 and extract # Download and extract
for year in ['2013', '2016']: for year in ['2013', '2016']:
name = 'odt{}.exe'.format(year) name = 'odt{}.exe'.format(year)
@ -582,7 +582,7 @@ def update_office():
shutil.move( shutil.move(
r'{}\{}'.format(global_vars['TmpDir'], year), r'{}\{}'.format(global_vars['TmpDir'], year),
r'{}\_Office\{}'.format(global_vars['CBinDir'], year)) r'{}\_Office\{}'.format(global_vars['CBinDir'], year))
# Cleanup # Cleanup
remove_from_temp('odt2013.exe') remove_from_temp('odt2013.exe')
remove_from_temp('odt2016.exe') remove_from_temp('odt2016.exe')
@ -590,7 +590,7 @@ def update_office():
def update_classic_start_skin(): def update_classic_start_skin():
# Remove existing folders # Remove existing folders
remove_from_kit('ClassicStartSkin') remove_from_kit('ClassicStartSkin')
# Download # Download
download_generic( download_generic(
r'{}\ClassicStartSkin'.format(global_vars['CBinDir']), r'{}\ClassicStartSkin'.format(global_vars['CBinDir']),
@ -600,13 +600,13 @@ def update_classic_start_skin():
def update_vcredists(): def update_vcredists():
# Remove existing folders # Remove existing folders
remove_from_kit('_vcredists') remove_from_kit('_vcredists')
# Prep # Prep
dest = r'{}\_vcredists'.format(global_vars['CBinDir']) dest = r'{}\_vcredists'.format(global_vars['CBinDir'])
include_path = r'{}\_include\_vcredists'.format(global_vars['CBinDir']) include_path = r'{}\_include\_vcredists'.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
for year in VCREDIST_SOURCES.keys(): for year in VCREDIST_SOURCES.keys():
for bit in ['32', '64']: for bit in ['32', '64']:
@ -620,10 +620,10 @@ def update_vcredists():
def update_one_ninite(section, dest, name, url, indent=8, width=40): def update_one_ninite(section, dest, name, url, indent=8, width=40):
# Prep # Prep
url = 'https://ninite.com/{}/ninite.exe'.format(url) url = 'https://ninite.com/{}/ninite.exe'.format(url)
# Download # Download
download_generic(out_dir=dest, out_name=name, source_url=url) download_generic(out_dir=dest, out_name=name, source_url=url)
# Copy to Installers folder # Copy to Installers folder
installer_parent = r'{}\Installers\Extras\{}'.format( installer_parent = r'{}\Installers\Extras\{}'.format(
global_vars['BaseDir'], section) global_vars['BaseDir'], section)
@ -647,16 +647,16 @@ def update_all_ninite(indent=8, width=40, other_results={}):
def update_caffeine(): def update_caffeine():
# Stop running processes # Stop running processes
kill_process('caffeine.exe') kill_process('caffeine.exe')
# Remove existing folders # Remove existing folders
remove_from_kit('Caffeine') remove_from_kit('Caffeine')
# Download # Download
download_to_temp('caffeine.zip', SOURCE_URLS['Caffeine']) download_to_temp('caffeine.zip', SOURCE_URLS['Caffeine'])
# Extract files # Extract files
extract_temp_to_cbin('caffeine.zip', 'Caffeine') extract_temp_to_cbin('caffeine.zip', 'Caffeine')
# Cleanup # Cleanup
remove_from_temp('caffeine.zip') remove_from_temp('caffeine.zip')
@ -664,16 +664,16 @@ def update_du():
# Stop running processes # Stop running processes
kill_process('du.exe') kill_process('du.exe')
kill_process('du64.exe') kill_process('du64.exe')
# Remove existing folders # Remove existing folders
remove_from_kit('Du') remove_from_kit('Du')
# Download # Download
download_to_temp('du.zip', SOURCE_URLS['Du']) download_to_temp('du.zip', SOURCE_URLS['Du'])
# Extract files # Extract files
extract_temp_to_cbin('du.zip', 'Du') extract_temp_to_cbin('du.zip', 'Du')
# Cleanup # Cleanup
remove_from_temp('du.zip') remove_from_temp('du.zip')
@ -681,21 +681,21 @@ def update_everything():
# Stop running processes # Stop running processes
for exe in ['Everything.exe', 'Everything64.exe']: for exe in ['Everything.exe', 'Everything64.exe']:
kill_process(exe) kill_process(exe)
# Remove existing folders # Remove existing folders
remove_from_kit('Everything') remove_from_kit('Everything')
# Download # Download
download_to_temp('everything32.zip', SOURCE_URLS['Everything32']) download_to_temp('everything32.zip', SOURCE_URLS['Everything32'])
download_to_temp('everything64.zip', SOURCE_URLS['Everything64']) download_to_temp('everything64.zip', SOURCE_URLS['Everything64'])
# Extract files # Extract files
extract_temp_to_cbin('everything64.zip', 'Everything', sz_args=['Everything.exe']) extract_temp_to_cbin('everything64.zip', 'Everything', sz_args=['Everything.exe'])
shutil.move( shutil.move(
r'{}\Everything\Everything.exe'.format(global_vars['CBinDir']), r'{}\Everything\Everything.exe'.format(global_vars['CBinDir']),
r'{}\Everything\Everything64.exe'.format(global_vars['CBinDir'])) r'{}\Everything\Everything64.exe'.format(global_vars['CBinDir']))
extract_temp_to_cbin('everything32.zip', 'Everything') extract_temp_to_cbin('everything32.zip', 'Everything')
# Cleanup # Cleanup
remove_from_temp('everything32.zip') remove_from_temp('everything32.zip')
remove_from_temp('everything64.zip') remove_from_temp('everything64.zip')
@ -703,86 +703,86 @@ def update_everything():
def update_firefox_ublock_origin(): def update_firefox_ublock_origin():
# Remove existing folders # Remove existing folders
remove_from_kit('FirefoxExtensions') remove_from_kit('FirefoxExtensions')
# Download # Download
download_to_temp('ff-uBO.xpi', SOURCE_URLS['Firefox uBO']) download_to_temp('ff-uBO.xpi', SOURCE_URLS['Firefox uBO'])
# Extract files # Extract files
extract_generic( extract_generic(
r'{}\ff-uBO.xpi'.format(global_vars['TmpDir']), r'{}\ff-uBO.xpi'.format(global_vars['TmpDir']),
r'{}\FirefoxExtensions\uBlock0@raymondhill.net'.format( r'{}\FirefoxExtensions\uBlock0@raymondhill.net'.format(
global_vars['CBinDir'])) global_vars['CBinDir']))
# Cleanup # Cleanup
remove_from_temp('ff-uBO.xpi') remove_from_temp('ff-uBO.xpi')
def update_notepadplusplus(): def update_notepadplusplus():
# Stop running processes # Stop running processes
kill_process('notepadplusplus.exe') kill_process('notepadplusplus.exe')
# Remove existing folders # Remove existing folders
remove_from_kit('NotepadPlusPlus') remove_from_kit('NotepadPlusPlus')
# Download # Download
download_to_temp('npp.7z', SOURCE_URLS['NotepadPlusPlus']) download_to_temp('npp.7z', SOURCE_URLS['NotepadPlusPlus'])
# Extract files # Extract files
extract_temp_to_cbin('npp.7z', 'NotepadPlusPlus') extract_temp_to_cbin('npp.7z', 'NotepadPlusPlus')
shutil.move( shutil.move(
r'{}\NotepadPlusPlus\notepad++.exe'.format(global_vars['CBinDir']), r'{}\NotepadPlusPlus\notepad++.exe'.format(global_vars['CBinDir']),
r'{}\NotepadPlusPlus\notepadplusplus.exe'.format(global_vars['CBinDir']) r'{}\NotepadPlusPlus\notepadplusplus.exe'.format(global_vars['CBinDir'])
) )
# Cleanup # Cleanup
remove_from_temp('npp.7z') remove_from_temp('npp.7z')
def update_putty(): def update_putty():
# Stop running processes # Stop running processes
kill_process('PUTTY.EXE') kill_process('PUTTY.EXE')
# Remove existing folders # Remove existing folders
remove_from_kit('PuTTY') remove_from_kit('PuTTY')
# Download # Download
download_to_temp('putty.zip', SOURCE_URLS['PuTTY']) download_to_temp('putty.zip', SOURCE_URLS['PuTTY'])
# Extract files # Extract files
extract_temp_to_cbin('putty.zip', 'PuTTY') extract_temp_to_cbin('putty.zip', 'PuTTY')
# Cleanup # Cleanup
remove_from_temp('putty.zip') remove_from_temp('putty.zip')
def update_treesizefree(): def update_treesizefree():
# Stop running processes # Stop running processes
kill_process('TreeSizeFree.exe') kill_process('TreeSizeFree.exe')
# Remove existing folders # Remove existing folders
remove_from_kit('TreeSizeFree') remove_from_kit('TreeSizeFree')
# Download # Download
download_to_temp( download_to_temp(
'treesizefree.zip', SOURCE_URLS['TreeSizeFree']) 'treesizefree.zip', SOURCE_URLS['TreeSizeFree'])
# Extract files # Extract files
extract_temp_to_cbin('treesizefree.zip', 'TreeSizeFree') extract_temp_to_cbin('treesizefree.zip', 'TreeSizeFree')
# Cleanup # Cleanup
remove_from_temp('treesizefree.zip') remove_from_temp('treesizefree.zip')
def update_xmplay(): def update_xmplay():
# Stop running processes # Stop running processes
kill_process('xmplay.exe') kill_process('xmplay.exe')
# Remove existing folders # Remove existing folders
remove_from_kit('XMPlay') remove_from_kit('XMPlay')
# Download # Download
download_to_temp('xmplay.zip', SOURCE_URLS['XMPlay']) download_to_temp('xmplay.zip', SOURCE_URLS['XMPlay'])
download_to_temp('xmp-7z.zip', SOURCE_URLS['XMPlay 7z']) download_to_temp('xmp-7z.zip', SOURCE_URLS['XMPlay 7z'])
download_to_temp('xmp-gme.zip', SOURCE_URLS['XMPlay Game']) download_to_temp('xmp-gme.zip', SOURCE_URLS['XMPlay Game'])
download_to_temp('xmp-rar.zip', SOURCE_URLS['XMPlay RAR']) download_to_temp('xmp-rar.zip', SOURCE_URLS['XMPlay RAR'])
download_to_temp('WAModern.zip', SOURCE_URLS['XMPlay WAModern']) download_to_temp('WAModern.zip', SOURCE_URLS['XMPlay WAModern'])
# Extract files # Extract files
extract_temp_to_cbin('xmplay.zip', 'XMPlay', extract_temp_to_cbin('xmplay.zip', 'XMPlay',
mode='e', sz_args=['xmplay.exe', 'xmplay.txt']) mode='e', sz_args=['xmplay.exe', 'xmplay.txt'])
@ -794,7 +794,7 @@ def update_xmplay():
r'{}\{}.zip'.format(global_vars['TmpDir'], item), r'{}\{}.zip'.format(global_vars['TmpDir'], item),
r'{}\XMPlay\plugins'.format(global_vars['CBinDir']), r'{}\XMPlay\plugins'.format(global_vars['CBinDir']),
mode='e', sz_args=filter) mode='e', sz_args=filter)
# Download Music # Download Music
dest = r'{}\XMPlay\music_tmp\MOD'.format(global_vars['CBinDir']) dest = r'{}\XMPlay\music_tmp\MOD'.format(global_vars['CBinDir'])
for mod in MUSIC_MOD: for mod in MUSIC_MOD:
@ -806,7 +806,7 @@ def update_xmplay():
name = '{}.rsn'.format(game) name = '{}.rsn'.format(game)
url = 'http://snesmusic.org/v2/download.php?spcNow={}'.format(game) url = 'http://snesmusic.org/v2/download.php?spcNow={}'.format(game)
download_generic(dest, name, url) download_generic(dest, name, url)
# Compress Music # Compress Music
cmd = [ cmd = [
global_vars['Tools']['SevenZip'], global_vars['Tools']['SevenZip'],
@ -815,7 +815,7 @@ def update_xmplay():
r'{}\XMPlay\music_tmp\*'.format(global_vars['CBinDir']), r'{}\XMPlay\music_tmp\*'.format(global_vars['CBinDir']),
] ]
run_program(cmd) run_program(cmd)
# Cleanup # Cleanup
remove_item(r'{}\XMPlay\music_tmp'.format(global_vars['CBinDir'])) remove_item(r'{}\XMPlay\music_tmp'.format(global_vars['CBinDir']))
remove_from_temp('xmplay.zip') remove_from_temp('xmplay.zip')
@ -828,10 +828,10 @@ def update_xmplay():
def update_adwcleaner(): def update_adwcleaner():
# Stop running processes # Stop running processes
kill_process('AdwCleaner.exe') kill_process('AdwCleaner.exe')
# Remove existing folders # Remove existing folders
remove_from_kit('AdwCleaner') remove_from_kit('AdwCleaner')
# Download # Download
url = resolve_dynamic_url( url = resolve_dynamic_url(
SOURCE_URLS['AdwCleaner'], SOURCE_URLS['AdwCleaner'],
@ -842,10 +842,10 @@ def update_adwcleaner():
def update_kvrt(): def update_kvrt():
# Stop running processes # Stop running processes
kill_process('KVRT.exe') kill_process('KVRT.exe')
# Remove existing folders # Remove existing folders
remove_from_kit('KVRT') remove_from_kit('KVRT')
# Download # Download
download_generic( download_generic(
r'{}\KVRT'.format(global_vars['CBinDir']), r'{}\KVRT'.format(global_vars['CBinDir']),
@ -855,10 +855,10 @@ def update_kvrt():
def update_rkill(): def update_rkill():
# Stop running processes # Stop running processes
kill_process('RKill.exe') kill_process('RKill.exe')
# Remove existing folders # Remove existing folders
remove_from_kit('RKill') remove_from_kit('RKill')
# Download # Download
url = resolve_dynamic_url( url = resolve_dynamic_url(
SOURCE_URLS['RKill'], SOURCE_URLS['RKill'],
@ -869,36 +869,59 @@ def update_rkill():
def update_tdsskiller(): def update_tdsskiller():
# Stop running processes # Stop running processes
kill_process('TDSSKiller.exe') kill_process('TDSSKiller.exe')
# Remove existing folders # Remove existing folders
remove_from_kit('TDSSKiller') remove_from_kit('TDSSKiller')
# Download # Download
download_generic( download_generic(
r'{}\TDSSKiller'.format(global_vars['CBinDir']), r'{}\TDSSKiller'.format(global_vars['CBinDir']),
'TDSSKiller.exe', 'TDSSKiller.exe',
SOURCE_URLS['TDSSKiller']) SOURCE_URLS['TDSSKiller'])
def update_winaiorepair():
# Stop running processes
kill_process('Repair_Windows.exe')
# Remove existing folders
remove_from_kit('WinAIO Repair')
# Download
download_to_temp('winaio.zip', SOURCE_URLS['WinAIO Repair'])
# Extract
extract_temp_to_cbin('winaio.zip', 'WinAIO Repair')
dest = r'{}\WinAIO Repair'.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'{}\WinAIO Repair\Tweaking.com - Windows Repair'.format(global_vars['CBinDir']))
# Cleanup
remove_from_temp('winaio.zip')
## Uninstallers ## ## Uninstallers ##
def update_iobit_uninstaller(): def update_iobit_uninstaller():
# Stop running processes # Stop running processes
kill_process('IObitUninstallerPortable.exe') kill_process('IObitUninstallerPortable.exe')
# Remove existing folders # Remove existing folders
remove_from_kit('IObitUninstallerPortable') remove_from_kit('IObitUninstallerPortable')
# Download # Download
download_generic( download_generic(
global_vars['CBinDir'], global_vars['CBinDir'],
'IObitUninstallerPortable.exe', 'IObitUninstallerPortable.exe',
SOURCE_URLS['IOBit_Uninstaller']) SOURCE_URLS['IOBit_Uninstaller'])
# "Install" # "Install"
cmd = r'{}\IObitUninstallerPortable.exe'.format(global_vars['CBinDir']) cmd = r'{}\IObitUninstallerPortable.exe'.format(global_vars['CBinDir'])
popen_program(cmd) popen_program(cmd)
sleep(1) sleep(1)
wait_for_process('IObitUninstallerPortable') wait_for_process('IObitUninstallerPortable')
# Cleanup # Cleanup
remove_from_kit('IObitUninstallerPortable.exe') remove_from_kit('IObitUninstallerPortable.exe')

View file

@ -619,6 +619,12 @@ LAUNCHERS = {
r'mkdir "%q_dir%">nul 2>&1', r'mkdir "%q_dir%">nul 2>&1',
], ],
}, },
'WinAIO Repair': {
'L_TYPE': 'Executable',
'L_PATH': 'WinAIO Repair',
'L_ITEM': 'Repair_Windows.exe',
'L_ELEV': 'True',
},
}, },
r'Uninstallers': { r'Uninstallers': {
'IObit Uninstaller': { 'IObit Uninstaller': {

View file

@ -39,6 +39,7 @@ SOURCE_URLS = {
'TreeSizeFree': 'https://www.jam-software.com/treesize_free/TreeSizeFree-Portable.zip', 'TreeSizeFree': 'https://www.jam-software.com/treesize_free/TreeSizeFree-Portable.zip',
'wimlib32': 'https://wimlib.net/downloads/wimlib-1.12.0-windows-i686-bin.zip', 'wimlib32': 'https://wimlib.net/downloads/wimlib-1.12.0-windows-i686-bin.zip',
'wimlib64': 'https://wimlib.net/downloads/wimlib-1.12.0-windows-x86_64-bin.zip', 'wimlib64': 'https://wimlib.net/downloads/wimlib-1.12.0-windows-x86_64-bin.zip',
'WinAIO Repair': 'http://www.tweaking.com/files/setups/tweaking.com_windows_repair_aio.zip',
'Winapp2': 'https://github.com/MoscaDotTo/Winapp2/archive/master.zip', 'Winapp2': 'https://github.com/MoscaDotTo/Winapp2/archive/master.zip',
'XMPlay 7z': 'http://support.xmplay.com/files/16/xmp-7z.zip?v=800962', 'XMPlay 7z': 'http://support.xmplay.com/files/16/xmp-7z.zip?v=800962',
'XMPlay Game': 'http://support.xmplay.com/files/12/xmp-gme.zip?v=515637', 'XMPlay Game': 'http://support.xmplay.com/files/12/xmp-gme.zip?v=515637',

View file

@ -79,6 +79,7 @@ if __name__ == '__main__':
try_and_print(message='KVRT...', function=update_kvrt, other_results=other_results, width=40) try_and_print(message='KVRT...', function=update_kvrt, other_results=other_results, width=40)
try_and_print(message='RKill...', function=update_rkill, other_results=other_results, width=40) try_and_print(message='RKill...', function=update_rkill, other_results=other_results, width=40)
try_and_print(message='TDSSKiller...', function=update_tdsskiller, other_results=other_results, width=40) try_and_print(message='TDSSKiller...', function=update_tdsskiller, other_results=other_results, width=40)
try_and_print(message='WinAIO Repair...', function=update_winaiorepair, other_results=other_results, width=40)
# Uninstallers # Uninstallers
print_info(' Uninstallers') print_info(' Uninstallers')

Binary file not shown.