Cannot use spaces encapsulated in double quotes on settings.json (even escaped) #15181

Open
opened 2026-01-31 04:30:46 +00:00 by claunia · 0 comments
Owner

Originally created by @g3nsvrv on GitHub (Sep 12, 2021).

Windows Terminal version (or Windows build number)

10.0.18363.0

Other Software

cmd.exe

Steps to reproduce

On settings.json use the following:

"commandline": "powershell.exe Start-Process cmd.exe '/c wt.exe -p \"Windows PowerShell\"' -verb runAs",

Double quotes is required since the name has an space character.

settings.json.txt

Expected Behavior

If you ran the same on powershell or cmd directly, you can get the expected result which is open the Windows Terminal with a Desired Profile:

PowerShell

Start-Process cmd.exe '/c wt.exe -p "Windows PowerShell"' -verb runAs

Command Prompt

powershell.exe Start-Process cmd.exe '/c wt.exe -p \"Windows PowerShell\"' -verb runAs```

image

Actual Behavior

This configuration is not being taken, instead opens the default profile.

image

Originally created by @g3nsvrv on GitHub (Sep 12, 2021). ### Windows Terminal version (or Windows build number) 10.0.18363.0 ### Other Software cmd.exe ### Steps to reproduce On **settings.json** use the following: ```json "commandline": "powershell.exe Start-Process cmd.exe '/c wt.exe -p \"Windows PowerShell\"' -verb runAs", ``` Double quotes is required since the name has an space character. [settings.json.txt](https://github.com/microsoft/terminal/files/7150019/settings.json.txt) ### Expected Behavior If you ran the same on powershell or cmd directly, you can get the expected result which is open the Windows Terminal with a Desired Profile: PowerShell ```powershell Start-Process cmd.exe '/c wt.exe -p "Windows PowerShell"' -verb runAs ``` Command Prompt ```cmd powershell.exe Start-Process cmd.exe '/c wt.exe -p \"Windows PowerShell\"' -verb runAs``` ``` ![image](https://user-images.githubusercontent.com/11720535/132996925-9b5ae5e7-6de7-4d18-bc95-aeb8e21cec78.png) ### Actual Behavior This configuration is not being taken, instead opens the default profile. ![image](https://user-images.githubusercontent.com/11720535/132996931-ec38c452-85fd-4812-a20b-3a4eeaa12997.png)
claunia added the Issue-QuestionNeeds-TriageNeeds-Tag-FixResolution-Answered labels 2026-01-31 04:30:46 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15181