Skip to content

Commit 70da5d3

Browse files
authored
Update SystemTester.bat
1 parent 326e15e commit 70da5d3

1 file changed

Lines changed: 28 additions & 102 deletions

File tree

SystemTester.bat

Lines changed: 28 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ setlocal enableextensions enabledelayedexpansion
99

1010
:: Constants
1111
set "MIN_ZIP_SIZE=10000000"
12-
REM ^-- Minimum expected ZIP size (~10MB) for validation
1312
set "DOWNLOAD_TIMEOUT_SEC=120"
1413
set "SCRIPT_VERSION=2.2"
1514

@@ -78,7 +77,7 @@ set "DRIVE_LETTER=%~d0"
7877
set "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"
8281
if "%PATH_LENGTH%"=="" set "PATH_LENGTH=0"
8382
if %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%"=="" (
112111
echo PowerShell version: %PS_VERSION%
113112
echo.
114113

115-
:: Check for Sysinternals folder (FIXED: Removed duplicate)
114+
:: Check for Sysinternals folder
116115
if 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 ========================================================
213203
echo FIXING POWERSHELL EXECUTION POLICY
214204
echo ========================================================
215205
echo.
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.
221206
echo Current policy:
222207
powershell -NoProfile -Command "Get-ExecutionPolicy -List | Format-Table -AutoSize"
223208
echo.
@@ -257,8 +242,6 @@ set "DOWNLOAD_URL=https://download.sysinternals.com/files/SysinternalsSuite.zip"
257242
echo This will download ~35MB from Microsoft.
258243
echo Target: %SYSINT_DIR%
259244
echo.
260-
echo NOTE: Includes PSPing for advanced network speed testing
261-
echo.
262245
set /p "confirm=Proceed? (Y/N): "
263246
if /i not "%confirm%"=="Y" goto MENU
264247

@@ -299,15 +282,6 @@ echo.
299282
set "TOOL_COUNT=0"
300283
for %%F in ("%SYSINT_DIR%\*.exe") do set /a TOOL_COUNT+=1
301284
echo [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-
311285
echo.
312286
echo TIP: Use Menu Option 4 to verify tool integrity
313287
echo.
@@ -339,15 +313,8 @@ echo.
339313
echo --------------------------------------------------------
340314
echo INSTALLED TOOLS:
341315
echo --------------------------------------------------------
342-
343-
:: Check GPU-Z with size validation
344316
if 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
362329
set "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
371334
if 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 ========================================================
465421
echo.
466422

467423
set "NVIDIA_SMI=C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe"
424+
set "NVIDIA_DRIVERS=C:\Program Files\NVIDIA Corporation"
468425

469426
if exist "%NVIDIA_SMI%" (
470427
echo [OK] NVIDIA System Management Interface found
@@ -508,35 +465,22 @@ echo AMD TOOLS VERIFICATION
508465
echo ========================================================
509466
echo.
510467

511-
:: Check for AMD GPU (FIXED: Check all registry subkeys)
468+
:: Check for AMD GPU
512469
set "AMD_FOUND="
513470
set "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
533477
if 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.
630574
echo - Stress tests generate SIGNIFICANT HEAT
631575
echo - Monitor temperatures during tests
632576
echo - 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)
636578
echo - Laptop users: Use caution with stress tests
637579
echo.
638-
echo ALWAYS check your specific GPU's safe temperature range
639-
echo from the manufacturer before stress testing!
640-
echo.
641580
echo ========================================================
642581
echo.
643582
pause
@@ -656,7 +595,6 @@ echo - Fixed memory usage calculation bug
656595
echo - Launcher awareness detection
657596
echo - Enhanced GPU testing with vendor-specific tools
658597
echo - GPU Tools Manager (Menu Option 6)
659-
echo - Improved AMD GPU detection for multi-GPU systems
660598
echo.
661599
echo --------------------------------------------------------
662600
echo COMMON ISSUES:
@@ -679,47 +617,29 @@ echo https://download.sysinternals.com/files/SysinternalsSuite.zip
679617
echo Extract to: %SCRIPT_DIR%\Sysinternals\
680618
echo.
681619
echo 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
688621
echo.
689-
echo 7. TESTS TAKE TOO LONG
622+
echo 6. TESTS TAKE TOO LONG
690623
echo Expected durations:
691624
echo - CPU Test: 10 seconds
692-
echo - Network Speed: 30-60 seconds
693625
echo - Energy Report: 15 seconds
694626
echo - Windows Update: 30-90 seconds
695627
echo - DISM/SFC: 5-15 minutes each
696628
echo.
697-
echo 8. REPORTS NOT GENERATED
629+
echo 7. REPORTS NOT GENERATED
698630
echo - Check write permissions
699631
echo - Ensure tests completed
700632
echo - Look for SystemTest_Clean_*.txt
701633
echo.
702-
echo 9. PATH TOO LONG
634+
echo 8. PATH TOO LONG
703635
echo Current: %PATH_LENGTH% characters
704636
echo Limit: 260 characters
705637
echo Solution: Move to C:\SysTest\
706638
echo.
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.
711639
echo --------------------------------------------------------
712640
echo FEATURES:
713641
echo --------------------------------------------------------
714642
echo.
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.
723643
echo REPORT TYPES:
724644
echo Clean Report - Summary with key findings
725645
echo Detailed Report - Full output from all tests
@@ -729,6 +649,12 @@ echo Checks digital signatures of all tools
729649
echo Validates file sizes
730650
echo Identifies Microsoft-signed vs others
731651
echo.
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.
732658
echo ADMIN DETECTION:
733659
echo Auto-elevates on startup
734660
echo Skips admin-required tests when not elevated
@@ -743,7 +669,7 @@ goto MENU
743669
:EXIT
744670
echo.
745671
echo ========================================================
746-
echo Thank you for using Portable Sysinternals System Tester!
672+
echo Thank you for using PNW Computers' Portable Sysinternals System Tester!
747673
echo Version %SCRIPT_VERSION%
748674
echo ========================================================
749675
echo.

0 commit comments

Comments
 (0)