Skip to content

Commit bac52e2

Browse files
committed
chore(bat): preserve working directory and window state on elevation (-WorkingDirectory, -WindowStyle Normal)
1 parent 57cf33f commit bac52e2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

SystemTester.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ echo.
4949
echo Requesting elevation...
5050
echo.
5151

52-
powershell -NoProfile -ExecutionPolicy Bypass -Command "Start-Process -FilePath '%~f0' -ArgumentList '/elevated' -Verb RunAs"
52+
powershell -NoProfile -ExecutionPolicy Bypass -Command "Start-Process -FilePath '%~f0' -ArgumentList '/elevated' -Verb RunAs -WorkingDirectory '%CD%' -WindowStyle Normal"
5353

5454
if errorlevel 1 (
5555
echo [ERROR] Failed to elevate. Run manually as administrator.

0 commit comments

Comments
 (0)