diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index b58b685f..ff151bc1 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -266,6 +266,46 @@ def update_fastcopy(): os.remove(r'{}\setup.exe'.format(_path, _installer)) remove_from_temp('FastCopy.zip') +def update_linux_reader(): + # Stop running processes + for exe in ['LinuxReader.exe', 'LinuxReader64.exe']: + kill_process(exe) + + # 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 + + # 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)] + 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') + def update_wimlib(): # Stop running processes kill_process('wimlib-imagex.exe') diff --git a/.bin/Scripts/settings/sources.py b/.bin/Scripts/settings/sources.py index 6bbe7e08..c65735f2 100644 --- a/.bin/Scripts/settings/sources.py +++ b/.bin/Scripts/settings/sources.py @@ -25,6 +25,7 @@ SOURCE_URLS = { 'Intel SSD Toolbox': r'https://downloadmirror.intel.com/27656/eng/Intel%20SSD%20Toolbox%20-%20v3.5.2.exe', 'IOBit_Uninstaller': 'https://portableapps.duckduckgo.com/IObitUninstallerPortable_7.5.0.7.paf.exe', 'KVRT': 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe', + 'Linux Reader': 'https://www.diskinternals.com/download/Linux_Reader.exe', 'Macs Fan Control': 'https://www.crystalidea.com/downloads/macsfancontrol_setup.exe', 'NirCmd32': 'https://www.nirsoft.net/utils/nircmd.zip', 'NirCmd64': 'https://www.nirsoft.net/utils/nircmd-x64.zip', diff --git a/.bin/Scripts/update_kit.py b/.bin/Scripts/update_kit.py index c7ff74cc..aec91c6b 100644 --- a/.bin/Scripts/update_kit.py +++ b/.bin/Scripts/update_kit.py @@ -32,6 +32,7 @@ if __name__ == '__main__': # Data Transfers print_info(' Data Transfers') try_and_print(message='FastCopy...', function=update_fastcopy, other_results=other_results, width=40) + try_and_print(message='Linux Reader...', function=update_linux_reader, other_results=other_results, width=40) try_and_print(message='wimlib...', function=update_wimlib, other_results=other_results, width=40) try_and_print(message='XYplorer...', function=update_xyplorer, other_results=other_results, width=40)