From 662f8c12547732154355d469b99d489fd8473d8d Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 24 Jun 2023 20:32:55 -0700 Subject: [PATCH] Fix bug when running a PowerShell script elevated --- scripts/Launch.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Launch.cmd b/scripts/Launch.cmd index 526ae4b3..c887f665 100644 --- a/scripts/Launch.cmd +++ b/scripts/Launch.cmd @@ -242,7 +242,7 @@ if defined L_NCMD ( rem use Powershell's window instead of %CON% echo UAC.ShellExecute "%POWERSHELL%", "%ps_args% -File "%script%"", "", "runas", 3 >> "%bin%\tmp\Elevate.vbs" ) else ( - echo UAC.ShellExecute "%CON%", "-run %POWERSHELL% %ps_args% -File "%script%" -new_console:n", "", "runas", 1 >> "%bin%\tmp\Elevate.vbs" + echo UAC.ShellExecute "%CON%", "-run %POWERSHELL% %ps_args% -File "^"%script%^"" -new_console:n", "", "runas", 1 >> "%bin%\tmp\Elevate.vbs" ) rem Run