Set the Windows Terminal as the “Default terminal applications" not work with administrator privileges. #20078

Open
opened 2026-01-31 07:02:51 +00:00 by claunia · 0 comments
Owner

Originally created by @fuchanghao on GitHub (Jun 14, 2023).

Windows Terminal version

1.17.11461.0

Windows build number

10.0.19044.3086

Other Software

No response

Steps to reproduce

log in windows 10 as normal user account.

set the Windows Terminal as the “Default terminal applications"

Test1:

create a simple "test.cmd"

cd /d c:\
pause

right click "test.cmd" and choose: "Run as administrator".

Test2:

double-click a cmd file which has “administrator elevation request” codes.

Test3:

log in as system build-in "Administrator" account and do the Test1 and Test2 again.

Test4:

1.log in as system build-in "Administrator" account.
2.open "Group Policy" and enable "User Account Control: Admin Approval Mode for the Built-in Administrator account" : https://learn.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/user-account-control-admin-approval-mode-for-the-built-in-administrator-account
3.Do the Test1 and Test2 again.

Expected Behavior

When I right click "test.cmd" and choose: "Run as administrator" or run a cmd file which has “administrator elevation request” codes.

After the UAC pop-up, It will open an "Administrator: Command Prompt" Tab on Windows Terminal to run the codes.

Actual Behavior

For Test1 and Test2:

It opens a conhost.exe and run the codes.

For Test3

It opens an "Administrator: Command Prompt" Tab on Windows Terminal to run the codes.

For Test4:

It opens a conhost.exe and run the codes again.

I don't know why the same “Default terminal applications" setting cause different results.

Originally created by @fuchanghao on GitHub (Jun 14, 2023). ### Windows Terminal version 1.17.11461.0 ### Windows build number 10.0.19044.3086 ### Other Software _No response_ ### Steps to reproduce log in windows 10 as normal user account. set the Windows Terminal as the “Default terminal applications" Test1: create a simple "test.cmd" ``` cd /d c:\ pause ``` right click "test.cmd" and choose: "Run as administrator". Test2: double-click a cmd file which has “administrator elevation request” codes. Test3: log in as system build-in "Administrator" account and do the Test1 and Test2 again. Test4: 1.log in as system build-in "Administrator" account. 2.open "Group Policy" and enable "User Account Control: Admin Approval Mode for the Built-in Administrator account" : https://learn.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/user-account-control-admin-approval-mode-for-the-built-in-administrator-account 3.Do the Test1 and Test2 again. ### Expected Behavior When I right click "test.cmd" and choose: "Run as administrator" or run a cmd file which has “administrator elevation request” codes. After the UAC pop-up, It will open an "Administrator: Command Prompt" Tab on Windows Terminal to run the codes. ### Actual Behavior For Test1 and Test2: It opens a conhost.exe and run the codes. For Test3 It opens an "Administrator: Command Prompt" Tab on Windows Terminal to run the codes. For Test4: It opens a conhost.exe and run the codes again. I don't know why the same “Default terminal applications" setting cause different results.
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 07:02:51 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20078