@@ -9,7 +9,6 @@ setlocal enableextensions enabledelayedexpansion
99
1010:: Constants
1111set " MIN_ZIP_SIZE = 10000000"
12- REM ^-- Minimum expected ZIP size (~10MB) for validation
1312set " DOWNLOAD_TIMEOUT_SEC = 120"
1413set " SCRIPT_VERSION = 2.2"
1514
@@ -78,7 +77,7 @@ set "DRIVE_LETTER=%~d0"
7877set " SCRIPT_PS1 = %SCRIPT_DIR% \SystemTester.ps1"
7978
8079:: Check path length
81- for /f %%i in ('powershell -NoProfile -Command " [int](Get-Item ' %~dp0 ').FullName .Length" 2^ > nul ') do set " PATH_LENGTH = %%i "
80+ for /f %%i in ('powershell -NoProfile -Command " (' %SCRIPT_DIR% ') .Length" 2^ > nul ') do set " PATH_LENGTH = %%i "
8281if " %PATH_LENGTH% " == " " set " PATH_LENGTH = 0"
8382if %PATH_LENGTH% GTR 200 (
8483 echo [WARNING] Path is %PATH_LENGTH% chars. Move to shorter path if errors occur.
@@ -112,21 +111,12 @@ if "%PS_VERSION%"=="" (
112111echo PowerShell version: %PS_VERSION%
113112echo .
114113
115- :: Check for Sysinternals folder (FIXED: Removed duplicate)
114+ :: Check for Sysinternals folder
116115if not exist " %SCRIPT_DIR% \Sysinternals" (
117116 echo [WARNING] Sysinternals folder not found!
118117 echo Use Menu Option 5 to download automatically.
119118 echo .
120119 timeout /t 2 > nul
121- ) else (
122- :: Check for PSPing specifically (for network speed tests)
123- if exist " %SCRIPT_DIR% \Sysinternals\psping.exe" (
124- echo [INFO] PSPing detected - Full network speed tests available
125- ) else (
126- echo [INFO] PSPing not found - Basic network tests only
127- echo Download Sysinternals Suite for full network testing
128- )
129- echo .
130120)
131121
132122:MENU
@@ -213,11 +203,6 @@ echo ========================================================
213203echo FIXING POWERSHELL EXECUTION POLICY
214204echo ========================================================
215205echo .
216- echo ABOUT EXECUTION POLICY:
217- echo RemoteSigned allows local scripts to run without signing,
218- echo but requires downloaded scripts to be digitally signed.
219- echo This is a good balance of security and functionality.
220- echo .
221206echo Current policy:
222207powershell -NoProfile -Command " Get-ExecutionPolicy -List | Format-Table -AutoSize"
223208echo .
@@ -257,8 +242,6 @@ set "DOWNLOAD_URL=https://download.sysinternals.com/files/SysinternalsSuite.zip"
257242echo This will download ~35MB from Microsoft.
258243echo Target: %SYSINT_DIR%
259244echo .
260- echo NOTE: Includes PSPing for advanced network speed testing
261- echo .
262245set /p " confirm = Proceed? (Y/N): "
263246if /i not " %confirm% " == " Y" goto MENU
264247
@@ -299,15 +282,6 @@ echo.
299282set " TOOL_COUNT = 0"
300283for %%F in (" %SYSINT_DIR% \*.exe" ) do set /a TOOL_COUNT += 1
301284echo [SUCCESS] %TOOL_COUNT% tools installed in %SYSINT_DIR%
302- echo .
303-
304- :: Check specifically for PSPing
305- if exist " %SYSINT_DIR% \psping.exe" (
306- echo [SUCCESS] PSPing installed - Network speed tests enabled!
307- ) else (
308- echo [WARNING] PSPing not found - Basic network tests only
309- )
310-
311285echo .
312286echo TIP: Use Menu Option 4 to verify tool integrity
313287echo .
@@ -339,15 +313,8 @@ echo.
339313echo --------------------------------------------------------
340314echo INSTALLED TOOLS:
341315echo --------------------------------------------------------
342-
343- :: Check GPU-Z with size validation
344316if exist " %GPUZ_PATH% " (
345- for %%A in (" %GPUZ_PATH% " ) do set " GPUZ_SIZE = %%~zA "
346- if !GPUZ_SIZE! GTR 1000000 (
347- echo [OK] GPU-Z.exe - Installed ^ (!GPUZ_SIZE! bytes^ )
348- ) else (
349- echo [!] GPU-Z.exe - File exists but seems corrupted ^(! GPUZ_SIZE! bytes^ )
350- )
317+ echo [OK] GPU-Z.exe - Installed
351318) else (
352319 echo [ ] GPU-Z.exe - Not installed
353320)
@@ -358,16 +325,12 @@ if exist "C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe" (
358325 echo [ ] NVIDIA-SMI - Not installed ^ (NVIDIA GPU drivers^ )
359326)
360327
361- :: Check for AMD tools (FIXED: Check multiple registry keys)
328+ :: Check for AMD tools
362329set " AMD_FOUND = "
363- for /f " tokens=*" %%K in ('reg query " HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}" /s 2^ > nul ^ | find " HKEY_" ') do (
364- reg query " %%K " /v DriverDesc 2 > nul | find /i " AMD" > nul 2 >& 1
365- if not errorlevel 1 (
366- set " AMD_FOUND = YES"
367- goto :AMD_FOUND
368- )
330+ for %%R in (" HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000" ) do (
331+ reg query %%R /v DriverDesc 2 > nul | find /i " AMD" > nul 2 >& 1
332+ if not errorlevel 1 set " AMD_FOUND = YES"
369333)
370- :AMD_FOUND
371334if defined AMD_FOUND (
372335 echo [OK] AMD GPU Drivers - Installed
373336) else (
@@ -398,14 +361,7 @@ if exist "%GPUZ_PATH%" (
398361 echo GPU-Z is already installed at:
399362 echo %GPUZ_PATH%
400363 echo .
401- for %%A in (" %GPUZ_PATH% " ) do (
402- set " GPUZ_SIZE = %%~zA "
403- echo Size: !GPUZ_SIZE! bytes
404- if !GPUZ_SIZE! LSS 1000000 (
405- echo [WARNING] File seems too small. May be corrupted.
406- echo Re-download if GPU-Z doesn't work properly.
407- )
408- )
364+ for %%A in (" %GPUZ_PATH% " ) do echo Size: %%~zA bytes
409365 echo .
410366 set /p " run_gpuz = Run GPU-Z now? (Y/N): "
411367 if /i " !run_gpuz! " == " Y" (
@@ -465,6 +421,7 @@ echo ========================================================
465421echo .
466422
467423set " NVIDIA_SMI = C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe"
424+ set " NVIDIA_DRIVERS = C:\Program Files\NVIDIA Corporation"
468425
469426if exist " %NVIDIA_SMI% " (
470427 echo [OK] NVIDIA System Management Interface found
@@ -508,35 +465,22 @@ echo AMD TOOLS VERIFICATION
508465echo ========================================================
509466echo .
510467
511- :: Check for AMD GPU (FIXED: Check all registry subkeys)
468+ :: Check for AMD GPU
512469set " AMD_FOUND = "
513470set " AMD_NAME = "
514- set " AMD_DRIVER_VERSION = "
515- set " AMD_DRIVER_DATE = "
516-
517- for /f " tokens=*" %%K in ('reg query " HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}" /s 2^ > nul ^ | find " HKEY_" ') do (
518- for /f " tokens=2*" %%a in ('reg query " %%K " /v DriverDesc 2^ > nul ^ | find " DriverDesc" ') do (
519- echo %%b | find /i " AMD" > nul 2 >& 1
520- if not errorlevel 1 (
521- set " AMD_FOUND = YES"
522- set " AMD_NAME = %%b "
523-
524- :: Get driver version and date
525- for /f " tokens=2*" %%v in ('reg query " %%K " /v DriverVersion 2^ > nul ^ | find " DriverVersion" ') do set " AMD_DRIVER_VERSION = %%w "
526- for /f " tokens=2*" %%d in ('reg query " %%K " /v DriverDate 2^ > nul ^ | find " DriverDate" ') do set " AMD_DRIVER_DATE = %%d "
527- goto :AMD_INFO_FOUND
528- )
529- )
471+ for /f " tokens=2*" %%a in ('reg query " HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000" /v DriverDesc 2^ > nul ^ | find " DriverDesc" ') do (
472+ set " AMD_NAME = %%b "
473+ echo %%b | find /i " AMD" > nul 2 >& 1
474+ if not errorlevel 1 set " AMD_FOUND = YES"
530475)
531476
532- :AMD_INFO_FOUND
533477if defined AMD_FOUND (
534478 echo [OK] AMD GPU Detected: %AMD_NAME%
535479 echo .
536480 echo AMD Driver Information:
537481 echo ========================================================
538- if defined AMD_DRIVER_VERSION echo Driver Version: %AMD_DRIVER_VERSION%
539- if defined AMD_DRIVER_DATE echo Driver Date: %AMD_DRIVER_DATE%
482+ reg query " HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000 " /v DriverVersion 2 > nul
483+ reg query " HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000 " /v DriverDate 2 > nul
540484 echo ========================================================
541485 echo .
542486 echo NOTE: AMD doesn't provide a command-line tool like
@@ -630,14 +574,9 @@ echo.
630574echo - Stress tests generate SIGNIFICANT HEAT
631575echo - Monitor temperatures during tests
632576echo - Ensure adequate cooling
633- echo - Safe temps vary by GPU model - check manufacturer specs
634- echo - General guidance: Stop if over 85C ^ (many GPUs^ )
635- echo - Some AMD GPUs safe to 110C junction temperature
577+ echo - Stop if temps exceed 85C (GPU) / 95C (hotspot)
636578echo - Laptop users: Use caution with stress tests
637579echo .
638- echo ALWAYS check your specific GPU's safe temperature range
639- echo from the manufacturer before stress testing!
640- echo .
641580echo ========================================================
642581echo .
643582pause
@@ -656,7 +595,6 @@ echo - Fixed memory usage calculation bug
656595echo - Launcher awareness detection
657596echo - Enhanced GPU testing with vendor-specific tools
658597echo - GPU Tools Manager (Menu Option 6)
659- echo - Improved AMD GPU detection for multi-GPU systems
660598echo .
661599echo --------------------------------------------------------
662600echo COMMON ISSUES:
@@ -679,47 +617,29 @@ echo https://download.sysinternals.com/files/SysinternalsSuite.zip
679617echo Extract to: %SCRIPT_DIR% \Sysinternals\
680618echo .
681619echo 5. MEMORY SHOWS 100%% (but Task Manager shows less)
682- echo This was a bug in earlier versions - FIXED in v2.1+
683- echo .
684- echo 6. NETWORK SPEED TESTS LIMITED
685- echo Cause: PSPing.exe not found
686- echo Solution: Download Sysinternals Suite (Option 5)
687- echo PSPing enables: Bandwidth testing, TCP latency
620+ echo This was a bug in v2.08 - FIXED in v2.2
688621echo .
689- echo 7 . TESTS TAKE TOO LONG
622+ echo 6 . TESTS TAKE TOO LONG
690623echo Expected durations:
691624echo - CPU Test: 10 seconds
692- echo - Network Speed: 30-60 seconds
693625echo - Energy Report: 15 seconds
694626echo - Windows Update: 30-90 seconds
695627echo - DISM/SFC: 5-15 minutes each
696628echo .
697- echo 8 . REPORTS NOT GENERATED
629+ echo 7 . REPORTS NOT GENERATED
698630echo - Check write permissions
699631echo - Ensure tests completed
700632echo - Look for SystemTest_Clean_*.txt
701633echo .
702- echo 9 . PATH TOO LONG
634+ echo 8 . PATH TOO LONG
703635echo Current: %PATH_LENGTH% characters
704636echo Limit: 260 characters
705637echo Solution: Move to C:\SysTest\
706638echo .
707- echo 10. AMD GPU NOT DETECTED
708- echo - Script now checks ALL registry subkeys
709- echo - Update AMD drivers if still not found
710- echo .
711639echo --------------------------------------------------------
712640echo FEATURES:
713641echo --------------------------------------------------------
714642echo .
715- echo NETWORK SPEED TESTING:
716- echo - Gateway connectivity tests
717- echo - Internet endpoint testing (Google, Cloudflare, MS)
718- echo - Latency measurements to multiple servers
719- echo - PSPing bandwidth capacity testing
720- echo - DNS resolution speed testing
721- echo - MTU path discovery
722- echo .
723643echo REPORT TYPES:
724644echo Clean Report - Summary with key findings
725645echo Detailed Report - Full output from all tests
@@ -729,6 +649,12 @@ echo Checks digital signatures of all tools
729649echo Validates file sizes
730650echo Identifies Microsoft-signed vs others
731651echo .
652+ echo GPU TESTING:
653+ echo Enhanced multi-GPU support
654+ echo NVIDIA-SMI integration
655+ echo AMD driver detection
656+ echo GPU-Z download assistant
657+ echo .
732658echo ADMIN DETECTION:
733659echo Auto-elevates on startup
734660echo Skips admin-required tests when not elevated
@@ -743,7 +669,7 @@ goto MENU
743669:EXIT
744670echo .
745671echo ========================================================
746- echo Thank you for using Portable Sysinternals System Tester!
672+ echo Thank you for using PNW Computers' Portable Sysinternals System Tester!
747673echo Version %SCRIPT_VERSION%
748674echo ========================================================
749675echo .
0 commit comments