Update installation script

Make sure to run Powershell using the Windows console host
This commit is contained in:
Howard Wu 2022-10-02 19:05:08 +08:00 committed by GitHub
parent f019514aca
commit 9672e2cfb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -691,7 +691,7 @@ function Finish {
If (-Not (Test-Administrator)) { If (-Not (Test-Administrator)) {
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force
\$proc = Start-Process -PassThru -WindowStyle Hidden -Verb RunAs powershell.exe -Args "-ExecutionPolicy Bypass -Command Set-Location '\$PSScriptRoot'; &'\$PSCommandPath' EVAL" \$proc = Start-Process -PassThru -WindowStyle Hidden -Verb RunAs ConHost.exe -Args "powershell -ExecutionPolicy Bypass -Command Set-Location '\$PSScriptRoot'; &'\$PSCommandPath' EVAL"
\$proc.WaitForExit() \$proc.WaitForExit()
If (\$proc.ExitCode -Ne 0) { If (\$proc.ExitCode -Ne 0) {
Clear-Host Clear-Host