Skip to content
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

Add Run as Administrator to Jump List context menu #7715

Closed
tlmii opened this issue Sep 23, 2020 · 15 comments
Closed

Add Run as Administrator to Jump List context menu #7715

tlmii opened this issue Sep 23, 2020 · 15 comments
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Milestone

Comments

@tlmii
Copy link
Member

tlmii commented Sep 23, 2020

Description of the new feature/enhancement

Showing the profiles on the jump list is a great addition. The one thing missing for my workflow is to be able to run the profile as an administrator. I run Terminal as non-admin most of the time (and don't need the jump list for that). But my case for picking a specific profile from the jump list - for a new window - is almost always because I need that one specific profile run as admin.

Proposed technical implementation details (optional)

Not very technical, but what I'd like to see: Add "Run as Administrator" to the context menu of each profile in the jump list, where currently "Open" is the only option.

@tlmii tlmii added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Sep 23, 2020
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Sep 23, 2020
@KalleOlaviNiemitalo
Copy link

KalleOlaviNiemitalo commented Sep 24, 2020

The documentation of destinations in a jump list mentions: "Each item in a destination list can be right-clicked for its own shortcut menu." Indeed, in the jump list of File Explorer, each folder in the "Frequent" category has a context menu that includes commands like "Open in Visual Studio", "Open in Windows Terminal", and "Git Bash Here".

The jump list of Windows Terminal however contains tasks rather than destinations. There is a rationale for that in the Add Profiles To Jumplist spec. I don't know whether Windows supports custom commands in context menus for tasks in a jump list.

@tlmii
Copy link
Member Author

tlmii commented Sep 24, 2020

Yeah, now that you mention it, I don't see any context menu options on any of my other apps on the task bar for items on their Tasks list. So it may not be possible. I hope there's a way around, because in this case it seems to make a lot of sense!

@DHowett
Copy link
Member

DHowett commented Sep 25, 2020

The best we'll plan to do for now is actually just gonna be to add a "Run as Administrator" (which launches to the default profile, not to any specific profile) task to the top of the list.

@DHowett DHowett added Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Sep 25, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Sep 25, 2020
@DHowett DHowett removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Sep 25, 2020
@DHowett DHowett added this to the Terminal Backlog milestone Sep 25, 2020
@WSLUser
Copy link
Contributor

WSLUser commented Sep 25, 2020

So it's actually at the bottom of the list currently. So users can still run as Administrator with the default profile. I do wish the jump list did have a run as option per profile but that could understandably be a post 2.0 thing.

@amithegde
Copy link

We need this, it takes more effort to open terminal every time😒
I also wish quick launch icons had properties to make it start with admin privileges. I know, I know, windbg doesn't support it but Sysinternals Proc Explorer supports it and it saves me few steps👌

@IBIT-ZEE
Copy link

IBIT-ZEE commented May 4, 2021

I think the most useful way would be:
right click the tab and have an option in the context menu
for re-launching as administrator (re-use the same tab)
or launch a new tab with the same command-line but as administrator...

@akrantz
Copy link

akrantz commented Oct 13, 2021

Is there a way I can make a pinned taskbar shortcut which ALWAYS runs as Administrator. I'd like this separately from having it pinned where it doesn't run as admin. I want to use this as a build window which needs to be elevated by default. I can right-click the pinned taskbar icon, and then right-click on "Windows Terminal" to get a "Run as Administrator" option -- which is what I do, but what I really want is an easy way to have a pinned item which opens elevated for a specific item.

I can sort of do this by running cmd /c wt.exe -o <profile> and there might be a way to make a shortcut for that, but it would be nice if there was a more direct way to achieve this.

@zadjii-msft
Copy link
Member

@akrantz when #632 lands (hopefully 1.13), you should be able to mark a profile as always elevated, and you could just click that in the jumplist to open an elevated window with that profile. If you want that as a separate taskbar icon, then yea, wt -p <your elevated profile> would be the commandline to use in your shortcut (again, once #632 lands).

@akrantz
Copy link

akrantz commented Oct 13, 2021

@zadjii-msft Thanks! I wasn't sure from the various issues whether this was being addressed already, and I'm glad that it is.

@zadjii-msft zadjii-msft modified the milestones: Terminal Backlog, Backlog Jan 4, 2022
@KalleOlaviNiemitalo
Copy link

If the task bar does not support custom menus for tasks in a jump list, can Ctrl+click or Ctrl+Shift+click on the jump list item be made to start the profile as elevated? Terminal creates an IShellLink with a wt.exe command, and I imagine the task bar itself could recognize Ctrl+Shift+click and run that command as elevated, but on Windows 10 version 21H2, it doesn't.

ICustomDestinationList::AddUserTasks allows IShellLink and IShellItem, and Terminal creates an IShellLink with a wt.exe command. If the link could instead point to a CLSID, then perhaps that class could implement some interface and receive a flag like CMIC_MASK_CONTROL_DOWN.

@vertigo220
Copy link

Appears to be a duplicate of #4459

@akrantz
Copy link

akrantz commented Jul 25, 2022

When I learned that holding Ctrl+Shift and clicking on the taskbar item will launch it elevated, I stopped trying to use right-click to run as Administrator. It still would be nice to have a discoverable option to do that. You can now right-click the taskbar item, then right-click "Windows Terminal" and get a "Run as Administrator" option, which is awkward for requiring two clicks. The other bug linked as a duplicate has lots of discussion about this, so I'll close this one.

@akrantz
Copy link

akrantz commented Jul 25, 2022

Well it doesn't seem like I can close the issue...

@zadjii-msft
Copy link
Member

Wow this totally is a /dup of #4459. I can't believe I ever missed that.

@zadjii-msft zadjii-msft closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2022
@ghost
Copy link

ghost commented Jul 25, 2022

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Jul 25, 2022
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. Needs-Tag-Fix Doesn't match tag requirements labels Jul 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

9 participants