@@ -9,6 +9,7 @@ setlocal enableextensions enabledelayedexpansion
99
1010:: Constants
1111set " MIN_ZIP_SIZE = 10000000"
12+ REM ^-- Minimum expected ZIP size (~10MB) for validation
1213set " DOWNLOAD_TIMEOUT_SEC = 120"
1314set " SCRIPT_VERSION = 2.2"
1415
@@ -77,7 +78,7 @@ set "DRIVE_LETTER=%~d0"
7778set " SCRIPT_PS1 = %SCRIPT_DIR% \SystemTester.ps1"
7879
7980:: Check path length
80- for /f %%i in ('powershell -NoProfile -Command " (' %SCRIPT_DIR% ') .Length" 2^ > nul ') do set " PATH_LENGTH = %%i "
81+ for /f %%i in ('powershell -NoProfile -Command " [int](Get-Item ' %~dp0 ').FullName .Length" 2^ > nul ') do set " PATH_LENGTH = %%i "
8182if " %PATH_LENGTH% " == " " set " PATH_LENGTH = 0"
8283if %PATH_LENGTH% GTR 200 (
8384 echo [WARNING] Path is %PATH_LENGTH% chars. Move to shorter path if errors occur.
@@ -111,29 +112,21 @@ if "%PS_VERSION%"=="" (
111112echo PowerShell version: %PS_VERSION%
112113echo .
113114
114- :: Check for Sysinternals folder
115+ :: Check for Sysinternals folder (FIXED: Removed duplicate)
115116if not exist " %SCRIPT_DIR% \Sysinternals" (
116117 echo [WARNING] Sysinternals folder not found!
117118 echo Use Menu Option 5 to download automatically.
118119 echo .
119120 timeout /t 2 > nul
120- )
121-
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
125121) else (
126- echo [INFO] PSPing not found - Basic network tests only
127- echo Download Sysinternals Suite for full network testing
128- )
129- echo .
130-
131- :: Check for Sysinternals folder
132- if not exist " %SCRIPT_DIR% \Sysinternals" (
133- echo [WARNING] Sysinternals folder not found!
134- echo Use Menu Option 5 to download automatically.
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+ )
135129 echo .
136- timeout /t 2 > nul
137130)
138131
139132:MENU
@@ -220,6 +213,11 @@ echo ========================================================
220213echo FIXING POWERSHELL EXECUTION POLICY
221214echo ========================================================
222215echo .
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 .
223221echo Current policy:
224222powershell -NoProfile -Command " Get-ExecutionPolicy -List | Format-Table -AutoSize"
225223echo .
@@ -341,8 +339,15 @@ echo.
341339echo --------------------------------------------------------
342340echo INSTALLED TOOLS:
343341echo --------------------------------------------------------
342+
343+ :: Check GPU-Z with size validation
344344if exist " %GPUZ_PATH% " (
345- echo [OK] GPU-Z.exe - Installed
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+ )
346351) else (
347352 echo [ ] GPU-Z.exe - Not installed
348353)
@@ -353,12 +358,16 @@ if exist "C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe" (
353358 echo [ ] NVIDIA-SMI - Not installed ^ (NVIDIA GPU drivers^ )
354359)
355360
356- :: Check for AMD tools
361+ :: Check for AMD tools (FIXED: Check multiple registry keys)
357362set " AMD_FOUND = "
358- for %%R in (" HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000" ) do (
359- reg query %%R /v DriverDesc 2 > nul | find /i " AMD" > nul 2 >& 1
360- if not errorlevel 1 set " AMD_FOUND = YES"
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+ )
361369)
370+ :AMD_FOUND
362371if defined AMD_FOUND (
363372 echo [OK] AMD GPU Drivers - Installed
364373) else (
@@ -389,7 +398,14 @@ if exist "%GPUZ_PATH%" (
389398 echo GPU-Z is already installed at:
390399 echo %GPUZ_PATH%
391400 echo .
392- for %%A in (" %GPUZ_PATH% " ) do echo Size: %%~zA bytes
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+ )
393409 echo .
394410 set /p " run_gpuz = Run GPU-Z now? (Y/N): "
395411 if /i " !run_gpuz! " == " Y" (
@@ -449,7 +465,6 @@ echo ========================================================
449465echo .
450466
451467set " NVIDIA_SMI = C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe"
452- set " NVIDIA_DRIVERS = C:\Program Files\NVIDIA Corporation"
453468
454469if exist " %NVIDIA_SMI% " (
455470 echo [OK] NVIDIA System Management Interface found
@@ -493,22 +508,35 @@ echo AMD TOOLS VERIFICATION
493508echo ========================================================
494509echo .
495510
496- :: Check for AMD GPU
511+ :: Check for AMD GPU (FIXED: Check all registry subkeys)
497512set " AMD_FOUND = "
498513set " AMD_NAME = "
499- 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 (
500- set " AMD_NAME = %%b "
501- echo %%b | find /i " AMD" > nul 2 >& 1
502- if not errorlevel 1 set " AMD_FOUND = YES"
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+ )
503530)
504531
532+ :AMD_INFO_FOUND
505533if defined AMD_FOUND (
506534 echo [OK] AMD GPU Detected: %AMD_NAME%
507535 echo .
508536 echo AMD Driver Information:
509537 echo ========================================================
510- reg query " HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000 " /v DriverVersion 2 > nul
511- reg query " HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000 " /v DriverDate 2 > nul
538+ if defined AMD_DRIVER_VERSION echo Driver Version: %AMD_DRIVER_VERSION%
539+ if defined AMD_DRIVER_DATE echo Driver Date: %AMD_DRIVER_DATE%
512540 echo ========================================================
513541 echo .
514542 echo NOTE: AMD doesn't provide a command-line tool like
@@ -602,9 +630,14 @@ echo.
602630echo - Stress tests generate SIGNIFICANT HEAT
603631echo - Monitor temperatures during tests
604632echo - Ensure adequate cooling
605- echo - Stop if temps exceed 85C (GPU) / 95C (hotspot)
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
606636echo - Laptop users: Use caution with stress tests
607637echo .
638+ echo ALWAYS check your specific GPU's safe temperature range
639+ echo from the manufacturer before stress testing!
640+ echo .
608641echo ========================================================
609642echo .
610643pause
@@ -623,6 +656,7 @@ echo - Fixed memory usage calculation bug
623656echo - Launcher awareness detection
624657echo - Enhanced GPU testing with vendor-specific tools
625658echo - GPU Tools Manager (Menu Option 6)
659+ echo - Improved AMD GPU detection for multi-GPU systems
626660echo .
627661echo --------------------------------------------------------
628662echo COMMON ISSUES:
@@ -645,7 +679,7 @@ echo https://download.sysinternals.com/files/SysinternalsSuite.zip
645679echo Extract to: %SCRIPT_DIR% \Sysinternals\
646680echo .
647681echo 5. MEMORY SHOWS 100%% (but Task Manager shows less)
648- echo This was a bug in v2.08 - FIXED in v2.1+
682+ echo This was a bug in earlier versions - FIXED in v2.1+
649683echo .
650684echo 6. NETWORK SPEED TESTS LIMITED
651685echo Cause: PSPing.exe not found
@@ -660,21 +694,25 @@ echo - Energy Report: 15 seconds
660694echo - Windows Update: 30-90 seconds
661695echo - DISM/SFC: 5-15 minutes each
662696echo .
663- echo 7 . REPORTS NOT GENERATED
697+ echo 8 . REPORTS NOT GENERATED
664698echo - Check write permissions
665699echo - Ensure tests completed
666700echo - Look for SystemTest_Clean_*.txt
667701echo .
668- echo 8 . PATH TOO LONG
702+ echo 9 . PATH TOO LONG
669703echo Current: %PATH_LENGTH% characters
670704echo Limit: 260 characters
671705echo Solution: Move to C:\SysTest\
672706echo .
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 .
673711echo --------------------------------------------------------
674712echo FEATURES:
675713echo --------------------------------------------------------
676714echo .
677- echo NETWORK SPEED TESTING (NEW) :
715+ echo NETWORK SPEED TESTING:
678716echo - Gateway connectivity tests
679717echo - Internet endpoint testing (Google, Cloudflare, MS)
680718echo - Latency measurements to multiple servers
0 commit comments