windows terminal (as well as windows terminal preview) only runs in admin mode #19312

Closed
opened 2026-01-31 06:39:45 +00:00 by claunia · 13 comments
Owner

Originally created by @haosmos on GitHub (Feb 4, 2023).

Originally assigned to: @zadjii-msft on GitHub.

Windows Terminal version

1.17.1023 (preview) & 1.16.10261.0

Windows build number

10.0.22000.1455

Other Software

No response

Steps to reproduce

windows terminal (as well as windows terminal preview) only runs in admin mode

windows terminal (as well as windows terminal preview) does not start in normal mode - when you click on the icon in the taskbar or when you run it from the power run field (a utility from the powertoys package) or when you use the wt.exe command on the command line or when you run it from WIN + R (wt.exe) - nothing happening.

it is possible to launch windows terminal (as well as windows terminal preview) only if you run it in administrator mode - either select this option in the taskbar, or from the power run field.

Expected Behavior

windows terminal (as well as windows terminal preview) run like regular windows programs without having to run them in administrator mode

Actual Behavior

when you click on the icon in the taskbar or when you run it from the power run field (a utility from the powertoys package) or when you use the wt.exe command on the command line or when you run it from WIN + R (wt.exe) - nothing happening.

it is possible to launch windows terminal only if you run it in administrator mode - either select this option in the taskbar, or from the power run field

Originally created by @haosmos on GitHub (Feb 4, 2023). Originally assigned to: @zadjii-msft on GitHub. ### Windows Terminal version 1.17.1023 (preview) & 1.16.10261.0 ### Windows build number 10.0.22000.1455 ### Other Software _No response_ ### Steps to reproduce windows terminal (as well as windows terminal preview) only runs in admin mode windows terminal (as well as windows terminal preview) does not start in normal mode - when you click on the icon in the taskbar or when you run it from the power run field (a utility from the powertoys package) or when you use the `wt.exe` command on the command line or when you run it from WIN + R (wt.exe) - nothing happening. it is possible to launch windows terminal (as well as windows terminal preview) only if you run it in administrator mode - either select this option in the taskbar, or from the power run field. ### Expected Behavior windows terminal (as well as windows terminal preview) run like regular windows programs without having to run them in administrator mode ### Actual Behavior when you click on the icon in the taskbar or when you run it from the power run field (a utility from the powertoys package) or when you use the wt.exe command on the command line or when you run it from WIN + R (wt.exe) - nothing happening. it is possible to launch windows terminal only if you run it in administrator mode - either select this option in the taskbar, or from the power run field
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 06:39:45 +00:00
Author
Owner

@Wuhao1627003 commented on GitHub (Feb 5, 2023):

Same thing happened to me with latest versions of WT and WT Preview. Never happened in earlier versions. Considering WT was updated 2 weeks ago, and worked fine last week, I suspect a compatibility problem with latest version of Win11 insiders build 25290.1000, which was released 3 days ago, roughly when the problem started for me.

@Wuhao1627003 commented on GitHub (Feb 5, 2023): Same thing happened to me with latest versions of WT and WT Preview. Never happened in earlier versions. Considering WT was updated 2 weeks ago, and worked fine last week, I suspect a compatibility problem with latest version of Win11 insiders build 25290.1000, which was released 3 days ago, roughly when the problem started for me.
Author
Owner

@haosmos commented on GitHub (Feb 5, 2023):

UPD: after disabling the option "run this profile as an administrator" in the wt settings (as well as wt preview), it turns out to run like normal programs.

but if you turn on the "run this profile as an administrator" option again, then wt (as well as wt preview) does not start again

@haosmos commented on GitHub (Feb 5, 2023): UPD: after disabling the option "run this profile as an administrator" in the wt settings (as well as wt preview), it turns out to run like normal programs. but if you turn on the "run this profile as an administrator" option again, then wt (as well as wt preview) does not start again
Author
Owner

@Wuhao1627003 commented on GitHub (Feb 5, 2023):

For me running as admin also won't work. A window shows, but is stuck there for several secs, then crashes.

@Wuhao1627003 commented on GitHub (Feb 5, 2023): For me running as admin also won't work. A window shows, but is stuck there for several secs, then crashes.
Author
Owner

@zadjii-msft commented on GitHub (Feb 5, 2023):

1.17.1023 (preview) & 1.16.10261.0

UPD: after disabling the option "run this profile as an administrator" in the wt settings (as well as wt preview), it turns out to run like normal programs.

but if you turn on the "run this profile as an administrator" option again, then wt (as well as wt preview) does not start again

Ruh roh, looks like #14637 must have actually broken some scenarios, despite fixing some other ones. That's no good. See also #14729, https://github.com/microsoft/terminal/releases/tag/v1.16.10261.0

I honestly don't know how to go about debugging this one. The last time we hit this, it was a loader issue, that was solved by calling into shell:AppsFolder instead....

Actually, that's somewhere to start I suppose. If you go to File Explorer, type shell:AppsFolder into the address bar and hit go, you'll open a list of applications. Is the Terminal in there/?

Note

for discussion: just bringing this to the team's attention.

@zadjii-msft commented on GitHub (Feb 5, 2023): > 1.17.1023 (preview) & 1.16.10261.0 > UPD: after disabling the option "run this profile as an administrator" in the wt settings (as well as wt preview), it turns out to run like normal programs. > > but if you turn on the "run this profile as an administrator" option again, then wt (as well as wt preview) does not start again Ruh roh, looks like #14637 must have actually _broken_ some scenarios, despite fixing some other ones. That's no good. See also #14729, https://github.com/microsoft/terminal/releases/tag/v1.16.10261.0 I honestly don't know how to go about debugging this one. The last time we hit this, it was a loader issue, that was solved by calling into `shell:AppsFolder` instead.... Actually, that's somewhere to start I suppose. If you go to File Explorer, type `shell:AppsFolder` into the address bar and hit go, you'll open a list of applications. Is the Terminal in there/? > **Note** for discussion: just bringing this to the team's attention.
Author
Owner

@haosmos commented on GitHub (Feb 6, 2023):

1.17.1023 (preview) & 1.16.10261.0

UPD: after disabling the option "run this profile as an administrator" in the wt settings (as well as wt preview), it turns out to run like normal programs.
but if you turn on the "run this profile as an administrator" option again, then wt (as well as wt preview) does not start again

Ruh roh, looks like #14637 must have actually broken some scenarios, despite fixing some other ones. That's no good. See also #14729, v1.16.10261.0 (release)

I honestly don't know how to go about debugging this one. The last time we hit this, it was a loader issue, that was solved by calling into shell:AppsFolder instead....

Actually, that's somewhere to start I suppose. If you go to File Explorer, type shell:AppsFolder into the address bar and hit go, you'll open a list of applications. Is the Terminal in there/?

Note for discussion: just bringing this to the team's attention.

yes, windows terminal (preview version also) are present here

explorer_KiXc2W3Eyo

@haosmos commented on GitHub (Feb 6, 2023): > > 1.17.1023 (preview) & 1.16.10261.0 > > > UPD: after disabling the option "run this profile as an administrator" in the wt settings (as well as wt preview), it turns out to run like normal programs. > > but if you turn on the "run this profile as an administrator" option again, then wt (as well as wt preview) does not start again > > Ruh roh, looks like #14637 must have actually _broken_ some scenarios, despite fixing some other ones. That's no good. See also #14729, [`v1.16.10261.0` (release)](https://github.com/microsoft/terminal/releases/tag/v1.16.10261.0) > > I honestly don't know how to go about debugging this one. The last time we hit this, it was a loader issue, that was solved by calling into `shell:AppsFolder` instead.... > > Actually, that's somewhere to start I suppose. If you go to File Explorer, type `shell:AppsFolder` into the address bar and hit go, you'll open a list of applications. Is the Terminal in there/? > > > Note for discussion: just bringing this to the team's attention. yes, windows terminal (preview version also) are present here ![explorer_KiXc2W3Eyo](https://user-images.githubusercontent.com/30666874/216856505-111f5b25-ef62-459e-a8ba-cfba7ff82970.png)
Author
Owner

@zadjii-msft commented on GitHub (Feb 6, 2023):

Team discussion thoughts: We need to keep these issues separate.

  • problem A: I've set elevate:true in one of my profiles, and now I can only launch my Terminal elevated. Trying to launch it unelevated doesn't work.
  • problem B: I tried to right-click "Run as admin" the Terminal, and it didn't launch.

The first goes through elevate-shim, the second doesn't.

(more here notes as we noodle...)

@zadjii-msft commented on GitHub (Feb 6, 2023): Team discussion thoughts: We need to keep these issues separate. * **problem A**: I've set `elevate:true` in one of my profiles, and now I can _only_ launch my Terminal elevated. Trying to launch it unelevated doesn't work. * **problem B**: I tried to right-click "Run as admin" the Terminal, and it didn't launch. The first goes through `elevate-shim`, the second doesn't. (more here notes as we noodle...)
Author
Owner

@jboelter commented on GitHub (Feb 7, 2023):

UPD: after disabling the option "run this profile as an administrator" in the wt settings (as well as wt preview), it turns out to run like normal programs.

but if you turn on the "run this profile as an administrator" option again, then wt (as well as wt preview) does not start again

This sounds like #13928

If you're running under the Administrator account (and maybe other account types?), using the "elevate": true or "Run this profile as Administrator" option in the settings.json or GUI will result in an infinite loop.

When you remove the elevate: true option and run cmd.exe, what does running net session say? This is an obscure way to see if you're running with admin privileges or not.

If you see this; then you are not running with administrative privileges (seems to disprove my hypothesis)

C:\Users\jboelter>net session
System error 5 has occurred.

Access is denied.

However, if you see this, then you are running with administrative privileges; despite not setting elevate: true or running as admin.

C:\Users\jboelter>net session
There are no entries in the list.

Note; you can also the change the setting to elevate: false in settings.json in the defaults and the specific profiles while it's in this crash loop and the window will suddenly appear.

@jboelter commented on GitHub (Feb 7, 2023): > UPD: after disabling the option "run this profile as an administrator" in the wt settings (as well as wt preview), it turns out to run like normal programs. > > but if you turn on the "run this profile as an administrator" option again, then wt (as well as wt preview) does not start again This sounds like #13928 If you're running under the Administrator account (and maybe other account types?), using the `"elevate": true` or "Run this profile as Administrator" option in the settings.json or GUI will result in an infinite loop. When you remove the `elevate: true` option and run cmd.exe, what does running `net session` say? This is an obscure way to see if you're running with admin privileges or not. If you see this; then you are not running with administrative privileges (seems to disprove my hypothesis) ``` C:\Users\jboelter>net session System error 5 has occurred. Access is denied. ``` However, if you see this, then you are running with administrative privileges; despite not setting `elevate: true` or running as admin. ``` C:\Users\jboelter>net session There are no entries in the list. ``` Note; you can also the change the setting to `elevate: false` in `settings.json` in the defaults and the specific profiles while it's in this crash loop and the window will suddenly appear.
Author
Owner

@haosmos commented on GitHub (Feb 7, 2023):

now I have "elevate": false for the default profile and the C:\Users\chaosmosr>net session command displays the following message in the console (I ran wt as administrator in the powershel profile in the settings the flag is set to run from profile as administrator:

WindowsTerminal_4xs4LN1S09

Code_O8NLSlwt2z

if i change when i change the value to "elevate": true in default profile or in powershell profile itself then wt doesn't start normally again, only run as administrator.

the net session command displays the same message: "There are no items in the list".

if I turn off the "run as profile as administrator" option for the default profile and leave the "run as profile as administrator" option for the powershell profile itself in the wt settings via the GUI, then nothing will change, wt will not start again.

but if I specify "elevate": false in the settings.json file for the default profile and for the powershell profile itself then wt runs like a normal program (without having to run wt as administrator), the the net session command prints this message to the console:

Code_L3htWE3UPx

@haosmos commented on GitHub (Feb 7, 2023): now I have `"elevate": false` for the default profile and the `C:\Users\chaosmosr>net session` command displays the following message in the console (I ran wt as administrator in the powershel profile in the settings the flag is set to run from profile as administrator: ![WindowsTerminal_4xs4LN1S09](https://user-images.githubusercontent.com/30666874/217218205-a3840959-f53d-4ab8-b465-be43de8b3390.png) ![Code_O8NLSlwt2z](https://user-images.githubusercontent.com/30666874/217218311-6b46b472-87cd-496a-9662-c50af7f40f5b.png) if i change when i change the value to "elevate": true in default profile or in powershell profile itself then wt doesn't start normally again, only run as administrator. the `net session` command displays the same message: `"There are no items in the list"`. if I turn off the "run as profile as administrator" option for the default profile and leave the "run as profile as administrator" option for the powershell profile itself in the wt settings via the GUI, then nothing will change, wt will not start again. but if I specify `"elevate": false` in the settings.json file for the default profile and for the powershell profile itself then wt runs like a normal program (without having to run wt as administrator), the the `net session` command prints this message to the console: ![Code_L3htWE3UPx](https://user-images.githubusercontent.com/30666874/217221867-abb966b3-e47d-4b7c-997a-4d1390cc8c34.png)
Author
Owner

@zadjii-msft commented on GitHub (Feb 13, 2023):

Wait could you clarify/?

In the first screenshot it looks like (defaults.elevate: false, powershell.elevate:true), and it looks like it's working just fine. But then right after that you mention:

if I turn off the "run as profile as administrator" option for the default profile and leave the "run as profile as administrator" option for the powershell profile itself in the wt settings via the GUI, then nothing will change, wt will not start again.

Which sounds like the opposite is true.

@zadjii-msft commented on GitHub (Feb 13, 2023): Wait could you clarify/? In the first screenshot it looks like (defaults.elevate: false, powershell.elevate:true), and it looks like it's working just fine. But then right after that you mention: > if I turn off the "run as profile as administrator" option for the default profile and leave the "run as profile as administrator" option for the powershell profile itself in the wt settings via the GUI, then nothing will change, wt will not start again. Which sounds like the opposite is true.
Author
Owner

@haosmos commented on GitHub (Feb 15, 2023):

Wait could you clarify/?

In the first screenshot it looks like (defaults.elevate: false, powershell.elevate:true), and it looks like it's working just fine. But then right after that you mention:

if I turn off the "run as profile as administrator" option for the default profile and leave the "run as profile as administrator" option for the powershell profile itself in the wt settings via the GUI, then nothing will change, wt will not start again.

Which sounds like the opposite is true.

perhaps in the previous comments indicated something wrong. Now checked again.

the windows terminal starts as a normal program (without the need to run as administrator) if you turn off the "run as administrator" option in the GUI settings: the settings.json file at this point looks like this:

WindowsTerminal_7T2iJ6UZmG

WindowsTerminal_n5kYq2Azqa

if I specify: "elevate": true" in settings.json in the default profile, and in PowerShell settings I specify "elevate": false", then I can run wt as a normal program.

But if I specify "elevate": true" in the PowerShell settings, then again I can't run wt as a normal program.

I'd like my default profile - PowerShell to run as administrator when starting wt, but so that I don't have to run wt, always as administrator.

@haosmos commented on GitHub (Feb 15, 2023): > Wait could you clarify/? > > In the first screenshot it looks like (defaults.elevate: false, powershell.elevate:true), and it looks like it's working just fine. But then right after that you mention: > > > if I turn off the "run as profile as administrator" option for the default profile and leave the "run as profile as administrator" option for the powershell profile itself in the wt settings via the GUI, then nothing will change, wt will not start again. > > Which sounds like the opposite is true. perhaps in the previous comments indicated something wrong. Now checked again. the windows terminal starts as a normal program (without the need to run as administrator) if you turn off the "run as administrator" option in the GUI settings: the settings.json file at this point looks like this: ![WindowsTerminal_7T2iJ6UZmG](https://user-images.githubusercontent.com/30666874/219014210-5db3c848-36d8-4d0b-81ee-bf829ee3e8c0.png) ![WindowsTerminal_n5kYq2Azqa](https://user-images.githubusercontent.com/30666874/219014228-4cc72808-623b-4bf2-9b33-fbba74e4a2c3.png) if I specify: "elevate": true" in settings.json in the default profile, and in PowerShell settings I specify "elevate": false", then I can run wt as a normal program. But if I specify "elevate": true" in the PowerShell settings, then again I can't run wt as a normal program. I'd like my default profile - PowerShell to run as administrator when starting wt, but so that I don't have to run wt, always as administrator.
Author
Owner

@haosmos commented on GitHub (Feb 15, 2023):

one more observation: when i specify "elevate": true" in settings.json in the default profile, then i can run wt as a normal program, but then wsl doesn't start. If i run wt as administrator, then wsl starts. if I specify "elevate": true" in settings.json in the default profile, then wsl is started.

@haosmos commented on GitHub (Feb 15, 2023): one more observation: when i specify "elevate": true" in settings.json in the default profile, then i can run wt as a normal program, but then wsl doesn't start. If i run wt as administrator, then wsl starts. if I specify "elevate": true" in settings.json in the default profile, then wsl is started.
Author
Owner

@zadjii-msft commented on GitHub (Feb 15, 2023):

Ah okay, thanks for the clarification. This does look like it's /dup #13928 then after all ☺️

@zadjii-msft commented on GitHub (Feb 15, 2023): Ah okay, thanks for the clarification. This does look like it's /dup #13928 then after all ☺️
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Feb 15, 2023):

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!

@microsoft-github-policy-service[bot] commented on GitHub (Feb 15, 2023): 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!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19312