Due to a shell limitation, Ctrl+Shift+Enter will not launch Windows Terminal as Administrator. This is caused by the app execution alias and the actual targeted executable not having the same name. In addition, PowerShell has an issue detecting app execution aliases as GUI/TUI applications. When you run wt from PowerShell, the shell will wait for WT to exit before returning to the prompt. Having a shim that immediately re-executes WindowsTerminal and then returns handily knocks this issue out (as the process that PS was waiting for exits immediately.) This could cause a regression for anybody who tries to capture the PID of wt.exe. Our process tree is not an API, and we have offered no consistency guarantee on it. VALIDATION ---------- Tested manual launch in a number of different scenarios: * [x] start menu "wtd" * [x] start menu tile * [x] powertoys run * [x] powertoys run ctrl+shift (admin) * [x] powershell inbox, "core" * [x] cmd * [x] run dialog * [x] run dialog ctrl+shift (admin) * [x] run from a lnk with window mode=maximized Fixes #4645 (PowerShell waits for wt) Fixes #6625 (Can't launch as admin using C-S-enter)
70 lines
1.6 KiB
Plaintext
70 lines
1.6 KiB
Plaintext
// Microsoft Visual C++ generated resource script.
|
|
//
|
|
#include "resource.h"
|
|
|
|
#define APSTUDIO_READONLY_SYMBOLS
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Generated from the TEXTINCLUDE 2 resource.
|
|
//
|
|
#include "winres.h"
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
#undef APSTUDIO_READONLY_SYMBOLS
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// English (United States) resources
|
|
|
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|
#pragma code_page(1252)
|
|
|
|
#ifdef APSTUDIO_INVOKED
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// TEXTINCLUDE
|
|
//
|
|
|
|
1 TEXTINCLUDE
|
|
BEGIN
|
|
"resource.h\0"
|
|
END
|
|
|
|
2 TEXTINCLUDE
|
|
BEGIN
|
|
"#include ""winres.h""\0"
|
|
END
|
|
|
|
3 TEXTINCLUDE
|
|
BEGIN
|
|
"\r\n"
|
|
"\0"
|
|
END
|
|
|
|
#endif // APSTUDIO_INVOKED
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Icon
|
|
//
|
|
|
|
// Icon with lowest ID value placed first to ensure application icon
|
|
// remains consistent on all systems.
|
|
IDI_APPICON ICON "..\\..\\..\\res\\terminal.ico"
|
|
|
|
#endif // English (United States) resources
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef APSTUDIO_INVOKED
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Generated from the TEXTINCLUDE 3 resource.
|
|
//
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
#endif // not APSTUDIO_INVOKED
|
|
|