Run Windows Terminal as Administrator at startup #4745

Closed
opened 2026-01-30 23:55:30 +00:00 by claunia · 6 comments
Owner

Originally created by @Melandel on GitHub (Oct 31, 2019).

Edit: By startup, I mean Windows Operating System startup.

Description of the new feature/enhancement

As a user who works primarily with the terminal,

I want Windows Terminal to offer me a way of running it as Administrator at Windows startup

So that I can start working instantly after logging in

Additional Notes

  • I tried setting C:\Users\me\AppData\Local\Microsoft\WindowsApps\wt.exe with "right click > Properties > Compatibility > Run this program as Administrator" but it didn't make it run as Administrator (I could confirm by renaming folders in the Program Files folder)
  • I tried setting C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe as well, but it didn't make Windows Terminal run as Administrator.
  • Given the two settings above, I tried setting pwsh.exe for being run as administrator, but
    • when running Windows Terminal (set up for being run as Administrator through its Properties), it opens then immediately closes.
    • when manually running Windows Terminal as Administrator (right click > run as Administrator), it works.

Proposed technical implementation details

Grant access to an exe file that we can effectively "right click > Properties > Compatibility > Run this program as Administrator".

Originally created by @Melandel on GitHub (Oct 31, 2019). **Edit:** By startup, I mean _**Windows Operating System** startup_. # Description of the new feature/enhancement As a user who works primarily with the terminal, I want Windows Terminal to offer me a way of running it as Administrator at Windows startup So that I can start working instantly after logging in # Additional Notes * I tried setting `C:\Users\me\AppData\Local\Microsoft\WindowsApps\wt.exe` with "right click > Properties > Compatibility > Run this program as Administrator" but it didn't make it run as Administrator (I could confirm by renaming folders in the `Program Files` folder) * I tried setting `C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe` as well, but it didn't make Windows Terminal run as Administrator. * Given the two settings above, I tried setting `pwsh.exe` for being run as administrator, but * when running Windows Terminal (set up for being run as Administrator through its Properties), it opens then immediately closes. * when manually running Windows Terminal as Administrator (right click > run as Administrator), it works. # Proposed technical implementation details Grant access to an exe file that we can **effectively** "right click > Properties > Compatibility > Run this program as Administrator".
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-FixResolution-Won't-Fix labels 2026-01-30 23:55:30 +00:00
Author
Owner

@akulbe commented on GitHub (Oct 31, 2019):

There are two ways that I know of, to start the Terminal as administrator, right now.

  1. Hold down Ctrl+Shift when you click the Terminal icon on your taskbar.
  2. See screenshot. Right-click on WT icon (1), right-click on "Windows Terminal (Preview)" (2), left-click on "Run as administrator."
    wt_run_as_admin
@akulbe commented on GitHub (Oct 31, 2019): There are two ways that I know of, to start the Terminal as administrator, _right now_. 1. Hold down Ctrl+Shift when you click the Terminal icon on your taskbar. 2. See screenshot. Right-click on WT icon (1), right-click on "Windows Terminal (Preview)" (2), left-click on "Run as administrator." ![wt_run_as_admin](https://user-images.githubusercontent.com/123279/67959747-6e9e5280-fbb6-11e9-81ad-155cc0e62a43.png)
Author
Owner

@Melandel commented on GitHub (Oct 31, 2019):

Thank you for your comment.

I meant Windows Operating System startup, as in when you boot your machine, and programs are run automatically, not startup as in when I run Windows Terminal.

I edited the original post. Thanks for pointing out this ambiguity!

What I want is

  • Start my computer
  • Log in
  • Go to the bathroom
  • See Windows Terminal run as Administrator waiting for me when I come back

Having Windows Terminal run on Windows OS startup is easily done - having it run on startup as Administrator is what I couldn't achieve

@Melandel commented on GitHub (Oct 31, 2019): Thank you for your comment. I meant Windows Operating System startup, as in when you boot your machine, and programs are run automatically, not startup as in when I run Windows Terminal. I edited the original post. Thanks for pointing out this ambiguity! What I want is * Start my computer * Log in * Go to the bathroom * See Windows Terminal run as Administrator waiting for me when I come back Having Windows Terminal run on Windows OS startup is easily done - having it run on startup _as Administrator_ is what I couldn't achieve
Author
Owner

@akulbe commented on GitHub (Oct 31, 2019):

I'm gonna go out on a limb here, and guess that your feature request won't be implemented. That'd be a HUGE security hole, and defeats the purpose of UAC in the first place. That's my $.02. ¯\_(ツ)_/¯

@akulbe commented on GitHub (Oct 31, 2019): I'm gonna go out on a limb here, and guess that your feature request won't be implemented. That'd be a **HUGE** security hole, and defeats the purpose of UAC in the first place. That's my $.02. ¯\\\_(ツ)_/¯
Author
Owner

@DHowett-MSFT commented on GitHub (Oct 31, 2019):

This is something we can't do with our current architecture. Thanks for the request!

@DHowett-MSFT commented on GitHub (Oct 31, 2019): This is something we can't do with our current architecture. Thanks for the request!
Author
Owner

@mhunsber commented on GitHub (May 9, 2022):

I was also trying to figure out how to have this launch as administrator at startup. In case anyone else lands here, what I ended up doing was creating a scheduled task that launches <LocalAppData>\Microsoft\WindowsApps\wt.exe and triggers at logon. Just make sure the "Run with highest privileges" checkbox is enabled so it runs with administrative privileges.

@mhunsber commented on GitHub (May 9, 2022): I was also trying to figure out how to have this launch _as administrator_ at startup. In case anyone else lands here, what I ended up doing was creating a scheduled task that launches `<LocalAppData>\Microsoft\WindowsApps\wt.exe` and triggers at logon. Just make sure the "Run with highest privileges" checkbox is enabled so it runs with administrative privileges.
Author
Owner

@JonathanPitre commented on GitHub (Oct 1, 2024):

I get the following error when I select wt.exe
image

@JonathanPitre commented on GitHub (Oct 1, 2024): I get the following error when I select wt.exe ![image](https://github.com/user-attachments/assets/aa78039a-65cd-4daa-8bdd-fcd4e8330888)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4745