Add -NoProfile and -ExecutionPolicy Bypass in powershell call

This commit is contained in:
Alexander Karatarakis 2018-01-25 17:27:43 -08:00
parent 186a2cf88b
commit e9b0de9d68

View File

@ -188,7 +188,7 @@ function vcpkgInvokeCommandClean()
$command = "& `"$cleanEnvScript`"; & `"$executable`" $arguments"
$bytes = [System.Text.Encoding]::Unicode.GetBytes($command)
$encodedCommand = [Convert]::ToBase64String($bytes)
$arg = "-encodedCommand $encodedCommand"
$arg = "-NoProfile -ExecutionPolicy Bypass -encodedCommand $encodedCommand"
$process = Start-Process -FilePath powershell.exe -ArgumentList $arg -PassThru -NoNewWindow
Wait-Process -InputObject $process