Исправно экранирование

This commit is contained in:
Flowseal 2024-11-12 23:05:02 +03:00
parent fce0da4d0e
commit 9d3cdd4aa0
3 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ set "arg=%1"
if "%arg%" == "admin" (
echo Restarted with admin rights
) else (
powershell -Command "Start-Process 'cmd.exe' -ArgumentList '/k \"%~f0 admin\"' -Verb RunAs"
powershell -Command "Start-Process 'cmd.exe' -ArgumentList '/k \"\"%~f0\" admin\"' -Verb RunAs"
exit /b
)

View File

@ -7,7 +7,7 @@ set "arg=%1"
if "%arg%" == "admin" (
echo Restarted with admin rights
) else (
powershell -Command "Start-Process 'cmd.exe' -ArgumentList '/k \"%~f0 admin\"' -Verb RunAs"
powershell -Command "Start-Process 'cmd.exe' -ArgumentList '/k \"\"%~f0\" admin\"' -Verb RunAs"
exit /b
)

View File

@ -6,7 +6,7 @@ set "arg=%1"
if "%arg%" == "admin" (
echo Restarted with admin rights
) else (
powershell -Command "Start-Process 'cmd.exe' -ArgumentList '/k \"%~f0 admin\"' -Verb RunAs"
powershell -Command "Start-Process 'cmd.exe' -ArgumentList '/k \"\"%~f0\" admin\"' -Verb RunAs"
exit /b
)