Terminal Preview: No longer able to launch (Admin) profile tab from non-admin Terminal #18305

Closed
opened 2026-01-31 06:09:54 +00:00 by claunia · 9 comments
Owner

Originally created by @tbakrf on GitHub (Aug 25, 2022).

Windows Terminal version

1.15.2283.0

Windows build number

10.0.22000.0

Other Software

No response

Steps to reproduce

When Terminal Preview was first released you could go into settings, copy a profile (e.g. Windows Terminal) and click the "run as administrator" toggle. At that point if you launch Terminal Preview, then choose the (admin) version, UAC comes up, and you authenticate and the admin version appears (separate instance). Recently this has started failing - no Admin version comes up and/or you get a WindowsTerminal.exe application error: "The application was unable to start correctly (0xc0000142)"

Expected Behavior

Expecting the option to chose the cloned profile with just the "run as administrator" toggle to launch UAC / launch a UAC instance of [profiles]

Actual Behavior

After UAC elevation nothing happens or 0xc0000142 application error (for new tab/ existing Terminal launches fine)

Originally created by @tbakrf on GitHub (Aug 25, 2022). ### Windows Terminal version 1.15.2283.0 ### Windows build number 10.0.22000.0 ### Other Software _No response_ ### Steps to reproduce When Terminal Preview was first released you could go into settings, copy a profile (e.g. Windows Terminal) and click the "run as administrator" toggle. At that point if you launch Terminal Preview, then choose the (admin) version, UAC comes up, and you authenticate and the admin version appears (separate instance). Recently this has started failing - no Admin version comes up and/or you get a WindowsTerminal.exe application error: "The application was unable to start correctly (0xc0000142)" ### Expected Behavior Expecting the option to chose the cloned profile with just the "run as administrator" toggle to launch UAC / launch a UAC instance of [profiles] ### Actual Behavior After UAC elevation nothing happens or 0xc0000142 application error (for new tab/ existing Terminal launches fine)
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 06:09:54 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Aug 25, 2022):

Is your admin account the same as your regular user account?

Can you share a screenshot of the 0xc0000142 error dialog? That might enlighten as to which process in this whole setup is actually the one that's failing to start.

Does launching the Terminal elevated via the taskbar
image
still work/?

@zadjii-msft commented on GitHub (Aug 25, 2022): Is your admin account the same as your regular user account? Can you share a screenshot of the `0xc0000142` error dialog? That might enlighten as to which process in this whole setup is actually the one that's failing to start. Does launching the Terminal elevated via the taskbar ![image](https://user-images.githubusercontent.com/18356694/186685557-445355ff-bc58-416d-a6c7-f29a0f79c42e.png) still work/?
Author
Owner

@tbakrf commented on GitHub (Aug 25, 2022):

Background: I had originally installed the preview version because non-preview originally lacked the run as admin setting for the profiles.
I have both apps now.

On Non-Preview:
New profile based on (ex.) PowerShell, just modify the profile name, toggle the "Run this profile as Administrator"
image

Launch Terminal (not elevated), when you need an elevated session, call a new tab for the admin version of the profile you just made:
image

UAC prompt appears (I have a separate admin account) - after filling in, 0xc0000142 error comes up:
image

Terminal Preview:
All the exact same steps as above - this worked fine until recently:
After the UAC prompt, a new, separate Windows of Terminal Preview would come up under the [UAC elevated account used] on same local desktop.
Now (within the past couple weeks max) no new instance launches (but also no error comes up telling you why it's not launching)

Both versions:
I can bypass this issue by launching (either) app itself directly as an admin (while under my non-admin Windows account):
image

[go through UAC as my separate admin account creds]
image

It's not the end of the world to launch a totally separate instance of Terminal to get elevated session tabs versus calling the admin version from a non-Admin Terminal; I'm just reporting because it was working under Preview before within the profiles for whatever reason. Maybe how Windows store handles the users separately...

Thanks!

@tbakrf commented on GitHub (Aug 25, 2022): Background: I had originally installed the preview version because non-preview originally lacked the run as admin setting for the profiles. I have both apps now. On Non-Preview: New profile based on (ex.) PowerShell, just modify the profile name, toggle the "Run this profile as Administrator" ![image](https://user-images.githubusercontent.com/15786305/186711644-dde6eb5d-b539-4ca3-99df-21a03c8d4145.png) Launch Terminal (not elevated), when you need an elevated session, call a new tab for the admin version of the profile you just made: ![image](https://user-images.githubusercontent.com/15786305/186712158-099a9e4f-ada3-4235-8676-4920633e2bba.png) UAC prompt appears (I have a separate admin account) - after filling in, 0xc0000142 error comes up: ![image](https://user-images.githubusercontent.com/15786305/186712255-9b6b52fc-383f-4d51-be45-728bc3733ea5.png) Terminal Preview: All the exact same steps as above - this worked fine until recently: After the UAC prompt, a new, separate Windows of Terminal Preview would come up under the [UAC elevated account used] on same local desktop. Now (within the past couple weeks max) no new instance launches (but also no error comes up telling you why it's not launching) Both versions: I can bypass this issue by launching (either) app itself directly as an admin (while under my non-admin Windows account): ![image](https://user-images.githubusercontent.com/15786305/186712378-035dadc1-c33a-48ae-abbc-2deb2bf5c916.png) [go through UAC as my separate admin account creds] ![image](https://user-images.githubusercontent.com/15786305/186712454-c913e6c2-48fd-4025-b481-0c6f49bd1e67.png) It's not the end of the world to launch a totally separate instance of Terminal to get elevated session tabs versus calling the admin version from a non-Admin Terminal; I'm just reporting because it was working under Preview before within the profiles for whatever reason. Maybe how Windows store handles the users separately... Thanks!
Author
Owner

@zadjii-msft commented on GitHub (Aug 25, 2022):

(@tbakrf I think you may have tried to reply via email, with some images in the body of the mail, but I think GH stripped those out)

@zadjii-msft commented on GitHub (Aug 25, 2022): (@tbakrf I think you may have tried to reply via email, with some images in the body of the mail, but I think GH stripped those out)
Author
Owner

@tbakrf commented on GitHub (Aug 25, 2022):

(@tbakrf I think you may have tried to reply via email, with some images in the body of the mail, but I think GH stripped those out)

My bad - hopefully edited version now works!

@tbakrf commented on GitHub (Aug 25, 2022): > (@tbakrf I think you may have tried to reply via email, with some images in the body of the mail, but I think GH stripped those out) My bad - hopefully edited version now works!
Author
Owner

@tbakrf commented on GitHub (Aug 25, 2022):

*In the end I can still call a separate standalone Terminal elevated, so if you see this as a non-issue I'm fine. I'm not sure if the run as administrator was originally / only intended for elevating under same user - just reporting that it did launch the separate one until recently. Thanks folks for reviewing!

@tbakrf commented on GitHub (Aug 25, 2022): *In the end I can still call a separate standalone Terminal elevated, so if you see this as a non-issue I'm fine. I'm not sure if the run as administrator was originally / only intended for elevating under same user - just reporting that it did launch the separate one until recently. Thanks folks for reviewing!
Author
Owner

@tbakrf commented on GitHub (Aug 25, 2022):

[edited for clarity]
On a separate machine as [non-admin user] it looks like you cannot UAC launch a Windows Terminal instance for [admin user] unless you have previously signed in under that [admin user] account and let Windows build a full desktop profile. It throws a warning that Terminal isn't installed for the [admin user]. It's not likely under normal working conditions that we'd fully sign in as a local admin user in our environment on every machine prior to trying to elevate Windows Terminal though; we usually only ever elevate to [admin user] under normal user accounts. Not sure if you can reproduce this or if that is a concern. Again, just some additional data points if it helps!

@tbakrf commented on GitHub (Aug 25, 2022): [edited for clarity] On a separate machine as [non-admin user] it looks like you cannot UAC launch a Windows Terminal instance for [admin user] unless you have previously signed in under that [admin user] account and let Windows build a full desktop profile. It throws a warning that Terminal isn't installed for the [admin user]. It's not likely under normal working conditions that we'd fully sign in as a local admin user in our environment on every machine prior to trying to elevate Windows Terminal though; we usually only ever elevate to [admin user] under normal user accounts. Not sure if you can reproduce this or if that is a concern. Again, just some additional data points if it helps!
Author
Owner

@zadjii-msft commented on GitHub (Aug 29, 2022):

Ah alrighty okay, this is /dup #4217. Thanks for all the details!

@zadjii-msft commented on GitHub (Aug 29, 2022): Ah alrighty okay, this is /dup #4217. Thanks for all the details!
Author
Owner

@BriceJamin commented on GitHub (Aug 31, 2022):

Hello, I have the same issue.

I am a normal (non root) user, launch terminal, click here

image

Then by right cliking on a profile I see I can launch it as admin

image

I try it
A new window ask me for admin password

image

Then I get that error

image

---------------------------
WindowsTerminal.exe - Erreur d’application
---------------------------
L’application n’a pas réussi à démarrer correctement (0xc0000142). Cliquez sur OK pour fermer l’application. 
---------------------------
OK   
---------------------------

To answer to @zadjii-msft

Does launching the Terminal elevated via the taskbar still work/?

I can't do that, I only can click on "Open" :

image

@BriceJamin commented on GitHub (Aug 31, 2022): Hello, I have the same issue. I am a normal (non root) user, launch terminal, click here ![image](https://user-images.githubusercontent.com/3600741/187640159-84af68da-a427-459b-acbe-0bc3d5389a19.png) Then by right cliking on a profile I see I can launch it as admin ![image](https://user-images.githubusercontent.com/3600741/187641797-4ee41baf-9cef-4673-9480-27b0c5c1834e.png) I try it A new window ask me for admin password ![image](https://user-images.githubusercontent.com/3600741/187641545-d99e0ed2-fb33-461d-927e-1e8a85a5342b.png) Then I get that error ![image](https://user-images.githubusercontent.com/3600741/187641652-81891d82-57b6-45cd-be7c-8d7cb439ec0a.png) ``` --------------------------- WindowsTerminal.exe - Erreur d’application --------------------------- L’application n’a pas réussi à démarrer correctement (0xc0000142). Cliquez sur OK pour fermer l’application. --------------------------- OK --------------------------- ``` To answer to @zadjii-msft > Does launching the Terminal elevated via the taskbar still work/? I can't do that, I only can click on "Open" : ![image](https://user-images.githubusercontent.com/3600741/187642467-0eb80adc-d148-4cc6-afb5-21eb6a24048e.png)
Author
Owner

@BriceJamin commented on GitHub (Aug 31, 2022):

If this is not an issue, I think than removing the message "Ctrl + Click" and removing this feature when you are not admin can be proper than raising an error.

@BriceJamin commented on GitHub (Aug 31, 2022): If this is not an issue, I think than removing the message "Ctrl + Click" and removing this feature when you are not admin can be proper than raising an error.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18305