windows: respect user console preference (#7482)

This commit is contained in:
Manuel Meitinger 2025-01-16 15:58:00 +01:00 committed by GitHub
parent ffb40ae212
commit 0e3b0992ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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'"