Terminal: Pressing CTRL+SHIFT, ENTER in Windows Run Dialog should run as admin

Created on 22 Jun 2020  路  4Comments  路  Source: microsoft/terminal

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!

Area-Commandline Issue-Task Priority-2 Product-Terminal Resolution-Fix-Committed

Most helpful comment

It turns out that when an application's _alias name_ doesn't match its _filename_ (as in our case, wt.exe is an alias for WindowsTerminal.exe), it fails out during elevated launch.

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 ...

All 4 comments

These work, though:

  • Press only the Windows key (not Windows+R), type "wt", and press Ctrl+Shift+Enter.
  • Open %USERPROFILE%\AppData\Local\Microsoft\WindowsApps in File Explorer, right-click wt.exe, and choose Run as Administrator.

I don't understand why it does not work for wt in the "Run" dialog, even though it works for e.g. skype, which likewise has a Microsoft Store signature. Is that caused by something in the AppX manifest?

So, we heard back from the AppX team about this. It's a bug in the platform :smile: 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, wt.exe is an alias for WindowsTerminal.exe), it fails out during elevated launch.

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 ...

:tada:This issue was addressed in #6860, which has now been successfully released as Windows Terminal Preview v1.2.2022.0.:tada:

Handy links:

Was this page helpful?
0 / 5 - 0 ratings