Running batch files as admin opens them in Windows Console Host instead of Windows Terminal even when Windows Terminal is selected as the default terminal application #21205

Closed
opened 2026-01-31 07:36:30 +00:00 by claunia · 2 comments
Owner

Originally created by @parvinderandroid on GitHub (Feb 5, 2024).

Windows Terminal version

1.18.3181.0

Windows build number

10.0.22631.3085

Other Software

No response

Steps to reproduce

Step 1. Create this batch file:

@Echo off
echo Hey
pause

Step 2. Right click on batch file
Step 3. Click on "Run as administrator"
Step 4. Click "Yes" on the elevation prompt

Expected Behavior

Batch file opens in Windows Terminal

Actual Behavior

Batch file opens in Windows Console Host

Originally created by @parvinderandroid on GitHub (Feb 5, 2024). ### Windows Terminal version 1.18.3181.0 ### Windows build number 10.0.22631.3085 ### Other Software _No response_ ### Steps to reproduce Step 1. Create this batch file: @Echo off echo Hey pause Step 2. Right click on batch file Step 3. Click on "Run as administrator" Step 4. Click "Yes" on the elevation prompt ### Expected Behavior Batch file opens in Windows Terminal ### Actual Behavior Batch file opens in Windows Console Host
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 07:36:30 +00:00
Author
Owner

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

Thanks for filing this! Basically, we've been tracking this in #10276. The way the default terminal setting works is based off Packaged COM. Unfortunately, Packaged COM still doesn't work for our needs in an elevated context.

Till then, follow /dup #10276

@zadjii-msft commented on GitHub (Feb 5, 2024): Thanks for filing this! Basically, we've been tracking this in #10276. The way the default terminal setting works is based off Packaged COM. Unfortunately, Packaged COM still doesn't work for our needs in an elevated context. Till then, follow /dup #10276
Author
Owner

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

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 5, 2024): 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! <!-- Policy app identification https://img.shields.io/static/v1?label=PullRequestIssueManagement. -->
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21205