Add -NoExit to $powershellcmd command within Start-Process argument list.

This commit is contained in:
Underscore 2024-10-10 15:12:39 -07:00
parent e4565f1f6f
commit 6a871b1feb

View File

@ -60,7 +60,7 @@ if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:
$powershellcmd = if (Get-Command pwsh -ErrorAction SilentlyContinue) { "pwsh" } else { "powershell" }
$processCmd = if (Get-Command wt.exe -ErrorAction SilentlyContinue) { "wt.exe" } else { $powershellcmd }
Start-Process $processCmd -ArgumentList "$powershellcmd -ExecutionPolicy Bypass -NoProfile -Command $script" -Verb RunAs
Start-Process $processCmd -ArgumentList "$powershellcmd -ExecutionPolicy Bypass -NoExit -NoProfile -Command $script" -Verb RunAs
break
}