Command line behavior difference when running as admin #23119

Closed
opened 2026-01-31 08:32:56 +00:00 by claunia · 3 comments
Owner

Originally created by @8LWXpg on GitHub (Apr 7, 2025).

Windows Terminal version

1.22.10731.0

Windows build number

10.0.26100.0

Other Software

No response

Steps to reproduce

  1. Enable Run this profile as Administrator in default profile settings
  2. Run following command
wt ssh <host>

Expected Behavior

No response

Actual Behavior

Image

The actual invocation:

"C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.22.10731.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe" --profile "{3ad42e7b-e073-5f3e-ac57-1c259ffa86a8}" --startingDirectory "E:\\" -- "ssh host" 

is not properly quoted and causing behavior difference.

Originally created by @8LWXpg on GitHub (Apr 7, 2025). ### Windows Terminal version 1.22.10731.0 ### Windows build number 10.0.26100.0 ### Other Software _No response_ ### Steps to reproduce 1. Enable `Run this profile as Administrator` in default profile settings 2. Run following command ``` wt ssh <host> ``` ### Expected Behavior _No response_ ### Actual Behavior ![Image](https://github.com/user-attachments/assets/97345b34-76f5-44d2-a59f-283af68ed789) The actual invocation: ``` "C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.22.10731.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe" --profile "{3ad42e7b-e073-5f3e-ac57-1c259ffa86a8}" --startingDirectory "E:\\" -- "ssh host" ``` is not properly quoted and causing behavior difference.
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 08:32:56 +00:00
Author
Owner

@DHowett commented on GitHub (Apr 9, 2025):

Thanks for the report! We're tracking this one over in /dup #14861 :)

@DHowett commented on GitHub (Apr 9, 2025): Thanks for the report! We're tracking this one over in /dup #14861 :)
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Apr 9, 2025):

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 (Apr 9, 2025): 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. -->
Author
Owner

@zadjii-msft commented on GitHub (Apr 9, 2025):

I mean, as a workaround, you can probably just use sudo ssh <whatever> instead of using "elevate": true 😉

@zadjii-msft commented on GitHub (Apr 9, 2025): I mean, as a workaround, you can probably just use `sudo ssh <whatever>` instead of using `"elevate": true` 😉
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23119