diff --git a/scripts/auto_setup.py b/scripts/auto_setup.py index 952572af..b301e058 100644 --- a/scripts/auto_setup.py +++ b/scripts/auto_setup.py @@ -63,7 +63,7 @@ BASE_MENUS = { MenuEntry('Create System Restore', 'auto_system_restore_create'), ), 'System Information': ( - MenuEntry('AIDA64 Report', 'auto_export_aida64_report'), + MenuEntry('AIDA64 Report', 'auto_export_aida64_report', selected=False), MenuEntry('Backup Registry', 'auto_backup_registry'), ), 'System Summary': ( @@ -77,7 +77,6 @@ BASE_MENUS = { ), 'Run Programs': ( MenuEntry('Device Manager', 'auto_open_device_manager'), - MenuEntry('HWiNFO Sensors', 'auto_open_hwinfo_sensors'), MenuEntry('Microsoft Store Updates', 'auto_open_microsoft_store_updates'), MenuEntry('Snappy Driver Installer', 'auto_open_snappy_driver_installer_origin'), MenuEntry('Webcam Tests', 'auto_open_mic_and_webcam_tests'), @@ -144,7 +143,6 @@ PRESETS = { ), 'Run Programs': ( 'Device Manager', - 'HWiNFO Sensors', 'XMPlay', ), }, diff --git a/scripts/winget.ps1 b/scripts/winget.ps1 deleted file mode 100644 index d1aaf40d..00000000 --- a/scripts/winget.ps1 +++ /dev/null @@ -1,54 +0,0 @@ -#Requires -Version 3.0 -if (Test-Path Env:\DEBUG) { - Set-PSDebug -Trace 1 -} -$Host.UI.RawUI.WindowTitle = "WizardKit: Winget wrapper" -$Host.UI.RawUI.BackgroundColor = "black" -$Host.UI.RawUI.ForegroundColor = "white" - - -## Functions ## -function Abort { - Write-Host -ForegroundColor "Red" "`nAborted." - WKPause "Press Enter to exit..." - exit -} -function WKPause ($Message = "Press Enter to continue... ") { - Write-Host $Message -NoNewLine - Read-Host -} - -## PowerShell equivalent of Python's "if __name__ == '__main__'" -# Code based on StackOverflow comments -# Question: https://stackoverflow.com/q/4693947 -# Using answer: https://stackoverflow.com/a/5582692 -# Asked by: https://stackoverflow.com/users/65164/mark-mascolino -# Answer by: https://stackoverflow.com/users/696808/bacon-bits -if ($MyInvocation.InvocationName -ne ".") { - Clear-Host - - # Check for winget and install if missing - Write-Host "WizardKit: winget wrapper`n`n`n`n`nInitializing..." - try { - $_ = $(winget --version) - } - catch { - Write-Host (" ERROR: Failed to run winget." ) -ForegroundColor "Red" - Write-Host " Installing winget..." - Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe - } - try { - $_ = $(winget --version) - } - catch { - Write-Host (" ERROR: Failed to run or install winget." ) -ForegroundColor "Red" - Abort - } - - # List available upgrades - Start-Process -FilePath "winget" -ArgumentList @("upgrade") -NoNewWindow -Wait - WKPause "`nPress Enter to install listed applications... " - - # Install upgrades - Start-Process -FilePath "winget" -ArgumentList @("upgrade", "--all") -NoNewWindow -Wait -} diff --git a/scripts/wk/cfg/launchers.py b/scripts/wk/cfg/launchers.py index ce39768b..62a06a91 100644 --- a/scripts/wk/cfg/launchers.py +++ b/scripts/wk/cfg/launchers.py @@ -22,12 +22,6 @@ LAUNCHERS = { 'L_ARGS': 'update', 'Extra Code': ['explorer ms-windows-store:updates'], }, - '2b) Winget Updates (EXPERIMENTAL)': { - 'L_TYPE': 'PSScript', - 'L_PATH': 'Scripts', - 'L_ITEM': 'winget.ps1', - 'L_ELEV': 'True', - }, '3) Snappy Driver Installer Origin': { 'L_TYPE': 'PyScript', 'L_PATH': 'Scripts', @@ -248,36 +242,6 @@ LAUNCHERS = { 'L_PATH': 'FurMark', 'L_ITEM': 'FurMark.exe', }, - 'HWiNFO': { - 'L_TYPE': 'Executable', - 'L_PATH': 'HWiNFO', - 'L_ITEM': 'HWiNFO.exe', - 'Extra Code': [ - r'for %%a in (32 64) do (', - r' copy /y "%bin%\HWiNFO\general.ini" "%bin%\HWiNFO\HWiNFO%%a.ini"', - r' (echo SensorsOnly=0)>>"%bin%\HWiNFO\HWiNFO%%a.ini"', - r' (echo SummaryOnly=0)>>"%bin%\HWiNFO\HWiNFO%%a.ini"', - r')', - ], - }, - 'HWiNFO (Sensors)': { - 'L_TYPE': 'Executable', - 'L_PATH': 'HWiNFO', - 'L_ITEM': 'HWiNFO.exe', - 'Extra Code': [ - r'for %%a in (32 64) do (', - r' copy /y "%bin%\HWiNFO\general.ini" "%bin%\HWiNFO\HWiNFO%%a.ini"', - r' (echo SensorsOnly=1)>>"%bin%\HWiNFO\HWiNFO%%a.ini"', - r' (echo SummaryOnly=0)>>"%bin%\HWiNFO\HWiNFO%%a.ini"', - r')', - ], - }, - 'Mac & Linux Reader': { - 'L_TYPE': 'Executable', - 'L_PATH': 'LinuxReader', - 'L_ITEM': 'LinuxReader.exe', - 'L_ELEV': 'True', - }, 'Notepad++': { 'L_TYPE': 'Executable', 'L_PATH': 'notepadplusplus', diff --git a/scripts/wk/cfg/sources.py b/scripts/wk/cfg/sources.py index d27d8995..a004c6d3 100644 --- a/scripts/wk/cfg/sources.py +++ b/scripts/wk/cfg/sources.py @@ -9,53 +9,40 @@ DOWNLOAD_FREQUENCY = 7 # Sources SOURCES = { # Main - 'AVRemover32': 'https://download.eset.com/com/eset/tools/installers/av_remover/latest/avremover_nt32_enu.exe', 'AVRemover64': 'https://download.eset.com/com/eset/tools/installers/av_remover/latest/avremover_nt64_enu.exe', 'AdwCleaner': 'https://adwcleaner.malwarebytes.com/adwcleaner?channel=release', - 'Autologon32': 'http://live.sysinternals.com/Autologon.exe', 'Autologon64': 'http://live.sysinternals.com/Autologon64.exe', - 'CoreTemp32': 'https://www.alcpu.com/CoreTemp/CoreTemp32.zip', 'CoreTemp64': 'https://www.alcpu.com/CoreTemp/CoreTemp64.zip', - 'ESET_NOD32_AV32': 'https://download.eset.com/com/eset/apps/home/eav/windows/latest/eav_nt32.exe', 'ESET_NOD32_AV64': 'https://download.eset.com/com/eset/apps/home/eav/windows/latest/eav_nt64.exe', - 'EmsisoftCmd32': 'https://dl.emsisoft.com/EmsisoftCommandlineScanner32.exe', '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', - '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', 'RKill': 'https://download.bleepingcomputer.com/grinler/rkill.exe', - 'RegDelNull': 'https://live.sysinternals.com/RegDelNull.exe', 'RegDelNull64': 'https://live.sysinternals.com/RegDelNull64.exe', # Build Kit - 'AIDA64': 'https://download.aida64.com/aida64engineer692.zip', - 'Adobe Reader DC': 'https://ardownload2.adobe.com/pub/adobe/reader/win/AcrobatDC/2300620360/AcroRdrDC2300620360_en_US.exe', + 'AIDA64': 'https://download.aida64.com/aida64engineer720.zip', + 'Adobe Reader DC': 'https://ardownload2.adobe.com/pub/adobe/acrobat/win/AcrobatDC/2400120615/AcroRdrDCx642400120615_en_US.exe', 'Aria2': 'https://github.com/aria2/aria2/releases/download/release-1.36.0/aria2-1.36.0-win-32bit-build1.zip', - 'Autoruns32': 'http://live.sysinternals.com/Autoruns.exe', 'Autoruns64': 'http://live.sysinternals.com/Autoruns64.exe', 'BleachBit': 'https://download.bleachbit.org/BleachBit-4.4.2-portable.zip', 'BCUninstaller': 'https://github.com/Klocman/Bulk-Crap-Uninstaller/releases/download/v5.7/BCUninstaller_5.7_portable.zip', - 'BlueScreenView32': 'http://www.nirsoft.net/utils/bluescreenview.zip', 'BlueScreenView64': 'http://www.nirsoft.net/utils/bluescreenview-x64.zip', 'DDU': 'https://www.wagnardsoft.com/DDU/download/DDU%20v18.0.6.8.exe', 'ERUNT': 'http://www.aumha.org/downloads/erunt.zip', - 'Everything32': 'https://www.voidtools.com/Everything-1.4.1.1024.x86.zip', 'Everything64': 'https://www.voidtools.com/Everything-1.4.1.1024.x64.zip', 'FastCopy': 'https://github.com/FastCopyLab/FastCopyDist2/raw/main/FastCopy5.4.2_installer.exe', 'Fluent-Metro': 'https://github.com/bonzibudd/Fluent-Metro/releases/download/v1.5.3/Fluent-Metro_1.5.3.zip', 'FurMark': 'https://geeks3d.com/dl/get/728', - 'HWiNFO': 'https://www.sac.sk/download/utildiag/hwi_764.zip', - 'LibreOffice32': 'https://download.documentfoundation.org/libreoffice/stable/7.6.2/win/x86/LibreOffice_7.6.2_Win_x86.msi', - 'LibreOffice64': 'https://download.documentfoundation.org/libreoffice/stable/7.6.2/win/x86_64/LibreOffice_7.6.2_Win_x86-64.msi', + 'LibreOffice64': 'https://download.documentfoundation.org/libreoffice/stable/7.6.6/win/x86_64/LibreOffice_7.6.6_Win_x86-64.msi', 'Linux Reader': 'https://www.diskinternals.com/download/Linux_Reader.exe', '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.5.8/npp.8.5.8.portable.minimalist.7z', 'OpenShell': 'https://github.com/Open-Shell/Open-Shell-Menu/releases/download/v4.4.191/OpenShellSetup_4_4_191.exe', - 'Prime95': 'https://www.mersenne.org/download/software/v30/30.8/p95v308b17.win64.zip', + 'Prime95': 'https://www.mersenne.org/download/software/v30/30.19/p95v3019b13.win64.zip', 'PuTTY': 'https://the.earth.li/~sgtatham/putty/latest/w32/putty.zip', 'SDIO Torrent': 'https://www.glenn.delahoy.com/downloads/sdio/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 09bd231d..d410cea7 100644 --- a/scripts/wk/kit/build_win.py +++ b/scripts/wk/kit/build_win.py @@ -122,9 +122,16 @@ def download_aida64() -> None: def download_autoruns() -> None: """Download Autoruns.""" - for item in ('Autoruns32', 'Autoruns64'): - out_path = BIN_DIR.joinpath(f'Sysinternals/{item}.exe') - download_file(out_path, SOURCES[item]) + out_path = BIN_DIR.joinpath(f'Sysinternals/Autoruns64.exe') + download_file(out_path, SOURCES['Autoruns64']) + + +def download_bcuninstaller() -> None: + """Download Bulk Crap Uninstaller.""" + archive = download_to_temp('BCU.zip', SOURCES['BCUninstaller']) + extract_to_bin(archive, 'BCUninstaller') + delete_from_temp('BCU.zip') + delete_item(BIN_DIR.joinpath('BCUninstaller/win-x86')) def download_bleachbit() -> None: @@ -144,9 +151,6 @@ def download_bleachbit() -> None: def download_bluescreenview() -> None: """Download BlueScreenView.""" - archive_32 = download_to_temp( - 'bluescreenview32.zip', SOURCES['BlueScreenView32'], - ) archive_64 = download_to_temp( 'bluescreenview64.zip', SOURCES['BlueScreenView64'], ) @@ -156,27 +160,18 @@ def download_bluescreenview() -> None: out_path.joinpath('BlueScreenView.exe'), out_path.joinpath('BlueScreenView64.exe'), ) - extract_archive(archive_32, out_path) - delete_from_temp('bluescreenview32.zip') delete_from_temp('bluescreenview64.zip') def download_coretemp(): """Download Core Temp.""" - archive_32 = download_to_temp('coretemp32.zip', SOURCES['CoreTemp32']) archive_64 = download_to_temp('coretemp64.zip', SOURCES['CoreTemp64']) out_path = BIN_DIR.joinpath('CoreTemp') - extract_archive(archive_32, out_path, 'Core Temp.exe') - rename_item( - out_path.joinpath('Core Temp.exe'), - out_path.joinpath('CoreTemp.exe'), - ) extract_archive(archive_64, out_path, 'Core Temp.exe') rename_item( out_path.joinpath('Core Temp.exe'), out_path.joinpath('CoreTemp64.exe'), ) - delete_from_temp('coretemp32.zip') delete_from_temp('coretemp64.zip') @@ -196,13 +191,6 @@ def download_ddu() -> None: delete_from_temp('DDU.exe') -def download_bcuninstaller() -> None: - """Download Bulk Crap Uninstaller.""" - archive = download_to_temp('BCU.zip', SOURCES['BCUninstaller']) - extract_to_bin(archive, 'BCUninstaller') - delete_from_temp('BCU.zip') - - def download_erunt() -> None: """Download ERUNT.""" archive = download_to_temp('erunt.zip', SOURCES['ERUNT']) @@ -212,7 +200,6 @@ def download_erunt() -> None: def download_everything() -> None: """Download Everything.""" - archive_32 = download_to_temp('everything32.zip', SOURCES['Everything32']) archive_64 = download_to_temp('everything64.zip', SOURCES['Everything64']) out_path = BIN_DIR.joinpath('Everything') extract_archive(archive_64, out_path, 'Everything.exe') @@ -220,8 +207,6 @@ def download_everything() -> None: out_path.joinpath('Everything.exe'), out_path.joinpath('Everything64.exe'), ) - extract_archive(archive_32, out_path) - delete_from_temp('everything32.zip') delete_from_temp('everything64.zip') @@ -229,14 +214,11 @@ def download_fastcopy() -> None: """Download FastCopy.""" installer = download_to_temp('FastCopyInstaller.exe', SOURCES['FastCopy']) out_path = BIN_DIR.joinpath('FastCopy') - tmp_path = TMP_DIR.joinpath('FastCopy64') - run_program([installer, '/NOSUBDIR', f'/DIR={out_path}', '/EXTRACT32']) - run_program([installer, '/NOSUBDIR', f'/DIR={tmp_path}', '/EXTRACT64']) + run_program([installer, '/NOSUBDIR', f'/DIR={out_path}', '/EXTRACT64']) rename_item( - tmp_path.joinpath('FastCopy.exe'), + out_path.joinpath('FastCopy.exe'), out_path.joinpath('FastCopy64.exe'), ) - delete_from_temp('FastCopy64') delete_from_temp('FastCopyInstaller.exe') delete_item(BIN_DIR.joinpath('FastCopy/setup.exe')) @@ -261,23 +243,15 @@ def download_furmark() -> None: delete_from_temp('FurMarkInstall') -def download_hwinfo() -> None: - """Download HWiNFO.""" - archive = download_to_temp('HWiNFO.zip', SOURCES['HWiNFO']) - extract_to_bin(archive, 'HWiNFO') - delete_from_temp('HWiNFO.zip') - - def download_libreoffice() -> None: """Download LibreOffice.""" - for arch in 32, 64: - out_path = INSTALLERS_DIR.joinpath(f'LibreOffice{arch}.msi') - download_file( - out_path, - SOURCES[f'LibreOffice{arch}'], - referer='https://www.libreoffice.org/download/download-libreoffice/', - ) - ui.sleep(1) + out_path = INSTALLERS_DIR.joinpath(f'LibreOffice64.msi') + download_file( + out_path, + SOURCES[f'LibreOffice64'], + referer='https://www.libreoffice.org/download/download-libreoffice/', + ) + ui.sleep(1) def download_linux_reader(): @@ -500,7 +474,6 @@ def build_kit() -> None: try_print.run('Everything...', download_everything) try_print.run('FastCopy...', download_fastcopy) try_print.run('FurMark...', download_furmark) - try_print.run('HWiNFO...', download_hwinfo) try_print.run('LibreOffice...', download_libreoffice) try_print.run('Linux Reader...', download_linux_reader) try_print.run('Macs Fan Control...', download_macs_fan_control) diff --git a/scripts/wk/setup/win.py b/scripts/wk/setup/win.py index 75bee042..5ac59fd2 100644 --- a/scripts/wk/setup/win.py +++ b/scripts/wk/setup/win.py @@ -598,11 +598,6 @@ def auto_open_device_manager() -> None: TRY_PRINT.run('Device Manager...', open_device_manager) -def auto_open_hwinfo_sensors() -> None: - """Open HWiNFO Sensors.""" - TRY_PRINT.run('HWiNFO Sensors...', open_hwinfo_sensors) - - def auto_open_mic_and_webcam_tests(): """Open Webcam Tests.""" TRY_PRINT.run('Webcam Tests...', open_mic_and_webcam_tests) @@ -1074,22 +1069,6 @@ def open_device_manager() -> None: popen_program(['mmc', 'devmgmt.msc']) -def open_hwinfo_sensors() -> None: - """Open HWiNFO sensors.""" - hwinfo_path = get_tool_path('HWiNFO', 'HWiNFO') - base_config = hwinfo_path.with_name('general.ini') - - # Write new config to disk - with open(hwinfo_path.with_suffix('.ini'), 'w', encoding='utf-8') as _f: - _f.write( - f'{base_config.read_text(encoding="utf-8")}\n' - 'SensorsOnly=1\nSummaryOnly=0\n' - ) - - # Open HWiNFO - run_tool('HWiNFO', 'HWiNFO', popen=True) - - def open_mic_and_webcam_tests(): """Open Webcam Tests.""" webbrowser.open('https://mictests.com/') diff --git a/setup/windows/build.ps1 b/setup/windows/build.ps1 index 08c561d4..c7824cba 100644 --- a/setup/windows/build.ps1 +++ b/setup/windows/build.ps1 @@ -92,7 +92,6 @@ if ($MyInvocation.InvocationName -ne ".") { DownloadFile -Path $Temp -Name "ConEmuPack.7z" -Url $Sources.'ConEmu' # Python - DownloadFile -Path $Temp -Name "python32.zip" -Url $Sources.'Python x32' DownloadFile -Path $Temp -Name "python64.zip" -Url $Sources.'Python x64' # Python: docopt @@ -100,18 +99,12 @@ if ($MyInvocation.InvocationName -ne ".") { # Python: mariadb $DownloadPage = "https://pypi.org/project/mariadb" - $RegEx = "href=.*-cp312-cp312-win32.whl" - $Url = FindDynamicUrl $DownloadPage $RegEx - DownloadFile -Path $Temp -Name "mariadb32.whl" -Url $Url $RegEx = "href=.*-cp312-cp312-win_amd64.whl" $Url = FindDynamicUrl $DownloadPage $RegEx DownloadFile -Path $Temp -Name "mariadb64.whl" -Url $Url # Python: psutil $DownloadPage = "https://pypi.org/project/psutil/" - $RegEx = "href=.*-abi3-win32.whl" - $Url = FindDynamicUrl $DownloadPage $RegEx - DownloadFile -Path $Temp -Name "psutil32.whl" -Url $Url $RegEx = "href=.*-abi3-win_amd64.whl" $Url = FindDynamicUrl $DownloadPage $RegEx DownloadFile -Path $Temp -Name "psutil64.whl" -Url $Url @@ -162,36 +155,34 @@ if ($MyInvocation.InvocationName -ne ".") { } # Python - foreach ($Arch in @("32", "64")) { - Write-Host "Extracting: Python (x$Arch)" - $Files = @( - "Pygments.whl", - "certifi.whl", - "chardet.whl", - "docopt.whl", - "idna.whl", - "mariadb$Arch.whl", - "packaging.whl", - "prompt_toolkit.whl", - "psutil$Arch.whl", - "python$Arch.zip", - "pytz.whl", - "requests.whl", - "urllib3.whl", - "wcwidth.whl" - ) - try { - foreach ($File in $Files) { - $ArgumentList = @( - "x", "$Temp\$File", "-o$Bin\Python\x$Arch", - "-aoa", "-bso0", "-bse0", "-bsp0") - Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait - } - } - catch { - Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red" + Write-Host "Extracting: Python (x64)" + $Files = @( + "Pygments.whl", + "certifi.whl", + "chardet.whl", + "docopt.whl", + "idna.whl", + "mariadb64.whl", + "packaging.whl", + "prompt_toolkit.whl", + "psutil64.whl", + "python64.zip", + "pytz.whl", + "requests.whl", + "urllib3.whl", + "wcwidth.whl" + ) + try { + foreach ($File in $Files) { + $ArgumentList = @( + "x", "$Temp\$File", "-o$Bin\Python\x64", + "-aoa", "-bso0", "-bse0", "-bsp0") + Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait } } + catch { + Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red" + } Remove-Item "$Temp\python*.zip" Remove-Item "$Temp\*.whl" foreach ($File in Get-ChildItem "$Bin\Python\*\*._pth") { @@ -200,13 +191,8 @@ if ($MyInvocation.InvocationName -ne ".") { ## Done ## Pop-Location - if ([System.Environment]::Is64BitOperatingSystem) { - $ConEmu = "$Bin\ConEmu\ConEmu64.exe" - $Python = "$Bin\Python\x64\python.exe" - } else { - $ConEmu = "$Bin\ConEmu\ConEmu.exe" - $Python = "$Bin\Python\x32\python.exe" - } + $ConEmu = "$Bin\ConEmu\ConEmu64.exe" + $Python = "$Bin\Python\x64\python.exe" $ArgumentList = @("-run", "$Python", "$Bin\Scripts\build_kit_windows.py", "-new_console:n") Start-Process -FilePath "$ConEmu" -ArgumentList $ArgumentList -verb RunAs } diff --git a/setup/windows/sources.json b/setup/windows/sources.json index 48de2c98..8989dd42 100644 --- a/setup/windows/sources.json +++ b/setup/windows/sources.json @@ -1,6 +1,5 @@ { - "7-Zip": "https://7-zip.org/a/7z2301.msi", + "7-Zip": "https://7-zip.org/a/7z2403-x64.msi", "ConEmu": "https://github.com/Maximus5/ConEmu/releases/download/v23.07.24/ConEmuPack.230724.7z", - "Python x32": "https://www.python.org/ftp/python/3.12.0/python-3.12.0-embed-win32.zip", - "Python x64": "https://www.python.org/ftp/python/3.12.0/python-3.12.0-embed-amd64.zip" + "Python x64": "https://www.python.org/ftp/python/3.12.2/python-3.12.2-embed-amd64.zip" }