diff --git a/scripts/README.md b/scripts/README.md index e6854ca9..7396a3ef 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -1,3 +1,5 @@ +# WizardKit: Scripts # + ## pylint ## These scripts use two spaces per indent instead of the default four. As such you will need to update your pylintrc file or run like this: diff --git a/scripts/wk/cfg/sources.py b/scripts/wk/cfg/sources.py index d81f8ca1..0fccd700 100644 --- a/scripts/wk/cfg/sources.py +++ b/scripts/wk/cfg/sources.py @@ -21,12 +21,10 @@ SOURCES = { 'EmsisoftCmd64': 'https://dl.emsisoft.com/EmsisoftCommandlineScanner64.exe', 'Firefox32': 'https://download.mozilla.org/?product=firefox-latest-ssl&os=win&lang=en-US', 'Firefox64': 'https://download.mozilla.org/?product=firefox-latest-ssl&os=win64&lang=en-US', - 'Fluent-Metro': 'https://github.com/bonzibudd/Fluent-Metro/releases/download/v1.5.2/Fluent-Metro_1.5.2.zip', 'HitmanPro32': 'https://dl.surfright.nl/HitmanPro.exe', 'HitmanPro64': 'https://dl.surfright.nl/HitmanPro_x64.exe', 'KVRT': 'https://devbuilds.s.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe', 'MBAM': 'https://downloads.malwarebytes.com/file/mb-windows', - 'OpenShell': 'https://github.com/Open-Shell/Open-Shell-Menu/releases/download/v4.4.160/OpenShellSetup_4_4_160.exe', 'RKill': 'https://download.bleepingcomputer.com/grinler/rkill.exe', 'RegDelNull': 'https://live.sysinternals.com/RegDelNull.exe', 'RegDelNull64': 'https://live.sysinternals.com/RegDelNull64.exe', @@ -52,6 +50,7 @@ SOURCES = { 'Everything32': 'https://www.voidtools.com/Everything-1.4.1.1009.x86.en-US.zip', 'Everything64': 'https://www.voidtools.com/Everything-1.4.1.1009.x64.en-US.zip', 'FastCopy': 'https://ftp.vector.co.jp/73/10/2323/FastCopy392_installer.exe', + 'Fluent-Metro': 'https://github.com/bonzibudd/Fluent-Metro/releases/download/v1.5.2/Fluent-Metro_1.5.2.zip', 'FurMark': 'https://geeks3d.com/dl/get/569', 'HWiNFO': 'https://www.sac.sk/download/utildiag/hwi_712.zip', 'IOBit Uninstaller': 'https://portableapps.com/redirect/?a=IObitUninstallerPortable&s=s&d=pa&f=IObitUninstallerPortable_7.5.0.7.paf.exe', @@ -61,6 +60,7 @@ SOURCES = { 'Macs Fan Control': 'https://www.crystalidea.com/downloads/macsfancontrol_setup.exe', 'Neutron': 'http://keir.net/download/neutron.zip', 'Notepad++': 'https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.1.5/npp.8.1.5.portable.minimalist.7z', + 'OpenShell': 'https://github.com/Open-Shell/Open-Shell-Menu/releases/download/v4.4.160/OpenShellSetup_4_4_160.exe', 'PuTTY': 'https://the.earth.li/~sgtatham/putty/latest/w32/putty.zip', 'SDIO Torrent': 'http://snappy-driver-installer.org/downloads/SDIO_Update.torrent', 'ShutUp10': 'https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe', diff --git a/scripts/wk/kit/build_win.py b/scripts/wk/kit/build_win.py index f2dea53c..2a11ece2 100644 --- a/scripts/wk/kit/build_win.py +++ b/scripts/wk/kit/build_win.py @@ -273,6 +273,13 @@ def download_notepad_plus_plus(): delete_from_temp('npp.7z') +def download_openshell(): + """Download OpenShell installer and Fluent-Metro skin.""" + for name in ('OpenShell.exe', 'Fluent-Metro.zip'): + out_path = BIN_DIR.joinpath(f'OpenShell/{name}') + download_file(out_path, SOURCES[name]) + + def download_putty(): """Download PuTTY.""" archive = download_to_temp('putty.zip', SOURCES['PuTTY']) @@ -484,6 +491,7 @@ def build_kit(): try_print.run('Macs Fan Control...', download_macs_fan_control) try_print.run('Neutron...', download_neutron) try_print.run('Notepad++...', download_notepad_plus_plus) + try_print.run('OpenShell...', download_openshell) try_print.run('PuTTY...', download_putty) try_print.run('Snappy Driver Installer...', download_snappy_driver_installer_origin) try_print.run('TestDisk...', download_testdisk) diff --git a/scripts/wk/repairs/win.py b/scripts/wk/repairs/win.py index f6dc6a66..a2bf7a13 100644 --- a/scripts/wk/repairs/win.py +++ b/scripts/wk/repairs/win.py @@ -1418,7 +1418,7 @@ def reset_windows_updates(): def restore_uac_defaults(): """Restore UAC default settings.""" settings = REG_UAC_DEFAULTS_WIN10 - if OS_VERSION != 10: + if OS_VERSION in (7, 8, 8.1): settings = REG_UAC_DEFAULTS_WIN7 reg_write_settings(settings) diff --git a/scripts/wk/setup/win.py b/scripts/wk/setup/win.py index cf45a34f..069ca07f 100644 --- a/scripts/wk/setup/win.py +++ b/scripts/wk/setup/win.py @@ -794,20 +794,16 @@ def install_libreoffice( def install_open_shell(): """Install Open Shell (just the Start Menu).""" - installer = get_tool_path('OpenShell', 'OpenShell', check=False) + skin_zip = get_tool_path('OpenShell', 'Fluent-Metro', suffix='zip') # Bail early if OS_VERSION != 10: raise GenericWarning('Unsupported OS') # Install OpenShell - download_tool('OpenShell', 'OpenShell') - download_tool('OpenShell', 'Fluent-Metro', suffix='zip') - cmd = [installer, '/qn', 'ADDLOCAL=StartMenu'] - run_program(cmd) + run_tool('OpenShell', 'OpenShell', '/qn', 'ADDLOCAL=StartMenu') # Install Skin - skin_zip = installer.with_name('Fluent-Metro.zip') extract_archive(skin_zip, f'{PROGRAMFILES_64}/Open-Shell/Skins', '-aoa') # Add scheduled task to handle OS upgrades