-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pressing CTRL+SHIFT, ENTER in Windows Run Dialog should run as admin #6625
Comments
These work, though:
I don't understand why it does not work for |
So, we heard back from the AppX team about this. It's a bug in the platform 😄 which I am certain is everyone's favorite thing to hear! |
It turns out that when an application's alias name doesn't match its filename (as in our case, We can fix this by renaming our executable or providing a local shim. I'm interested in the shim option, as it might solve another issue we've been hitting ... |
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. Fixes #4645 (PowerShell waits for wt) Fixes #6625 (Can't launch as admin using C-S-enter)
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)
🎉This issue was addressed in #6860, which has now been successfully released as Handy links: |
Description of the new feature/enhancement
Would like to be able to open the Windows "Run" dialog (WINKEY+R) and type "wt", then press CTRL+SHIFT+ENTER to open as an Administrator, like I do with "cmd.exe" (or any other app).
I'm not sure if this should be filed as a feature or a bug...
Proposed technical implementation details (optional)
Thanks!
The text was updated successfully, but these errors were encountered: