-
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
Add "Run As Administrator" menu option to Start Menu and Taskbar #4459
Comments
Your start menu screenshot is a screenshot of our issue template 😄 |
My point is to make it more accessible, not that it is not possible. Having to right click twice from the taskbar icon when it is a command need is inefficient. |
Now, Windows Terminal is not:
I don't feel it's that much needed to duplicate an existing feature in such a unsystematic and aesthetically frustrating manner. I know that we are talking about a product intended mainly for Windows, in which POLP is often neglected, but I do want to bring up that running something by default with elevated privileges is considered to be a bad practice. |
Yes please ! Implement it like in pwsh with JumpList tasks : https://github.com/PowerShell/PowerShell/tree/db370dcc794e2f7b3c93e00b4538f1485d937f13/src/Microsoft.PowerShell.ConsoleHost/WindowsTaskbarJumpList |
I would actually love to see the Run As Administrator also in the drop-down in the Terminal application where you select which terminal you want. This would make quick access and then I would only do it when I really needed to. I know it would need to start up a new process, but have that process start in the terminal mode I selected and elevated would be awesome. |
I see more issues with the whole app concept. |
@cstueckrath that would be how apps work from the Windows Store, everyone of them work in that manner (few exceptions, but not many). Option would be to just grab the msix file from the release page of this repository and try to install it under the context of just that user. |
@wsmelton I know, and I don't mind running calculator or paint as "Apps", but for management tools? They should be available and updateable system wide. |
FWIW, I have literally just installed Terminal, it took me around 10-15 seconds to ask myself "how to I run a terminal as an administrator". I clicked feedback, then search open issues for "administrator" and came here.... |
@cstueckrath The entire "Apps" concept still has a long way to ever get to the point where Windows is a modular system consisting of "Apps", but seeing the developers attitude under Nadella, chances are that Windows will crack open its sources like NetScape back in the days, and Azure (or Outlook, or Xbox Game Pass) will be his main business long before that might happen. |
I would like to add Windows Terminal to Start menu and Taskbar so that when I click it, it will start elevated. How do I do that (without right-clicking)? |
Create a shortcut to "C:\Windows\system32\cmd.exe /c start /b wt", set it to be Run As administrator from properties. |
yes, but instead of menu option, can't we have the simple 'sudo bash' equivalent ? we are talking about console/command line here :-) |
@garyng2000 Unfortunately, it's not that simple. You may be interested in #1032 (comment) |
I don't quite understand the #1032 issue, I assume you meant security. What would be the difference between 'sudo bash' vs 'right click' then run as Admin on the start menu ? I don't really need to have the 'current terminal' session to be the parent of the 'elevated shell', but just give me a completely unrelated shell is fine. The usage scenario is just 'I am already in the directory I am in and need elevation for certain tasks'. VS Code can do this too when I try to save files under '\Windows' so why the 'terminal' app cannot ? Though not a big issue as I already have the habit of just having a few 'admin' shell opened via the 'right click' route. |
For When you right-click "run as admin" launch a process, it spawns a new terminal window, and that window is elevated, so it's protected from input being injected by other applications. This is the fundamental reason there isn't a builtin in-console elevation exe like I believe that |
yes, but that is a lot of typing vs 'sudo bash'(and I have to include the working directory as well which becomes even longer) :-) I would say 90% of the usage of 'sudo bash' is what I am doing(well may be there are some exotic way in the linux world utilizing what you mentioned but I have no experience of that personally). |
I've been using these context menu shortcuts: Did few modifications, but some less cryptic way would be nice too:
|
I spent about 5 minutes right clicking on the pinned icon I had for the terminal in my taskbar trying to figure out why I couldn't see "Properties" in there and use that to set it to always run as admin... Every other application I've ever used on windows lets me set it to run as an administrator automatically using that. Eventually I figured it was because it was a windows store app which for some reason gives it a completely different menu than everything else, but that really clashes with my expectations as a user. Putting this automatic "Run as Administrator" feature would at least let us get parity with the functionality we as users are used to. |
I see the menu, but there's no "Properties" in there that I can set it to always run as administrator. |
ah, that is not possible AFAIK for security reason. The WindowsApp is locked down, not even admin can access it so all these tricks of changing property would not work. |
Just found this blog post. Credit: This is a dirty approach (but man ANYWAY IT WORKS): patching
$linkFilePath = "C:\Users\$([Environment]::UserName)\Desktop\WindowsTerminal.lnk"
$bytes = [System.IO.File]::ReadAllBytes($linkFilePath)
$bytes[0x15] = $bytes[0x15] -bor 0x20 #set byte 21 (0x15) bit 6 (0x20) ON
[System.IO.File]::WriteAllBytes($linkFilePath, $bytes) Though this is not considered as a clean & elegant approach, it still works perfectly. |
|
Having an option like "Run as admin" within the context menu for a tab/pane would also be more accessible and let users give a particular tab/pane elevated privileges on demand. |
I think having a quick action available directly when right-clicking the taskbar icon is easier than right-clicking once, then right-clicking again on the executable. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Until this gets implemented those that are double right clicking to run as administrator may instead want to perform a shift-right-click which will bring you directly to a menu with the "Run as administrator" option. |
Or just ctrl shit left click to open directly as admin ;) |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
FWIW This will probably need #12191 to add |
As I understand, we do have:Right click on terminal icon on taskbar (1) ⇒ right click on terminal menu terminal itself icon (2) ⇒ we have "Run As Administrator" option:Nice to have:Right click on terminal icon on taskbar (1) ⇒ right click on terminal menu, any profile icon (2) ⇒ we have only "Open" option, but want to have also "Run As Administrator" option:I want to implement it.And actually we do have option to run as admin any profile from profiles menu, open profiles "drop down" and right click on any profile: |
Description of the new feature/enhancement
Ability, primarily in Windows, to easily open the terminal app in an elevated session. Either via the Start Menu icon, as the PowerShell app does it, or via the taskbar icon.
Example for Start Menu:
Example for Taskbar icon:
The text was updated successfully, but these errors were encountered: