File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,6 +139,8 @@ powershell -ExecutionPolicy Bypass -File .\SystemTester.ps1
139139powershell -ExecutionPolicy Bypass -File .\SystemTester.ps1 -AutoRun
140140```
141141
142+ > ℹ️ ** Launcher compatibility:** The batch launcher automatically detects either ` SystemTester_FIXED.ps1 ` or the legacy ` SystemTester.ps1 ` filename, so both naming conventions continue to work.
143+
142144### ** First-Time Setup**
143145
144146If Sysinternals tools are missing:
Original file line number Diff line number Diff line change 7474:: Set paths
7575set " SCRIPT_DIR = %cd% "
7676set " DRIVE_LETTER = %~d0 "
77- set " SCRIPT_PS1 = %SCRIPT_DIR% \SystemTester.ps1"
77+
78+ :: Locate PowerShell script (supports legacy and _FIXED names)
79+ set " SCRIPT_PS1 = "
80+ set " SCRIPT_PS1_NAME = "
81+ if exist " %SCRIPT_DIR% \SystemTester_FIXED.ps1" (
82+ set " SCRIPT_PS1 = %SCRIPT_DIR% \SystemTester_FIXED.ps1"
83+ set " SCRIPT_PS1_NAME = SystemTester_FIXED.ps1"
84+ ) else if exist " %SCRIPT_DIR% \SystemTester.ps1" (
85+ set " SCRIPT_PS1 = %SCRIPT_DIR% \SystemTester.ps1"
86+ set " SCRIPT_PS1_NAME = SystemTester.ps1"
87+ )
7888
7989:: Check path length
8090for /f %%i in ('powershell -NoProfile -Command " ('%SCRIPT_DIR% ').Length" 2^ > nul ') do set " PATH_LENGTH = %%i "
@@ -90,15 +100,22 @@ echo Path length: %PATH_LENGTH% characters
90100echo .
91101
92102:: Verify PowerShell script exists
93- if not exist " %SCRIPT_PS1% " (
94- echo [ERROR] PowerShell script not found: %SCRIPT_PS1%
103+ if " %SCRIPT_PS1% " == " " (
104+ echo [ERROR] PowerShell script not found in: %SCRIPT_DIR%
105+ echo .
106+ echo Expected one of the following files:
107+ echo - SystemTester_FIXED.ps1
108+ echo - SystemTester.ps1
95109 echo .
96- echo Ensure SystemTester.ps1 is in the same folder .
110+ echo If you renamed the script, restore one of the supported names .
97111 echo .
98112 pause
99113 exit /b 1
100114)
101115
116+ echo Using PowerShell script: %SCRIPT_PS1_NAME%
117+ echo .
118+
102119:: Check PowerShell version
103120echo Checking PowerShell...
104121for /f " tokens=*" %%v in ('powershell -NoProfile -Command " $PSVersionTable.PSVersion.ToString()" 2^ > nul ') do set " PS_VERSION = %%v "
You can’t perform that action at this time.
0 commit comments