diff --git a/release/installbuilder/run.ps1 b/release/installbuilder/run.ps1 index 802ce3230..38079290c 100644 --- a/release/installbuilder/run.ps1 +++ b/release/installbuilder/run.ps1 @@ -1,5 +1,5 @@ $tool = $args[0] -if (Get-Command wt -ErrorAction SilentlyContinue) { +if ((Get-Command wt -ErrorAction SilentlyContinue) -and ((Get-ItemProperty -LiteralPath 'HKCU:\Console\%%Startup' -Name 'DelegationConsole' -ErrorAction SilentlyContinue).DelegationConsole -ne '{B23D10C0-E52E-411E-9D5B-C09FDF709C7D}')) { Start-Process wt -ArgumentList "powershell.exe","-Command","& '$PSScriptRoot\bin\$tool.exe'" } else { Start-Process powershell -ArgumentList "-Command","& '$PSScriptRoot\bin\$tool.exe'"