terminal: Cannot use spaces encapsulated in double quotes on settings.json (even escaped)
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.
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```

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

About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 18 (3 by maintainers)
came here via the email (presumably) you sent out from the other long, locked thread, and using the guid for the profile solved it!! i get a new window that is properly elevated and colored and is in powershell and not bash and everything. excellent work, thank you so much
That means that all the team will not be able to resolve this? the case is closed, and should be open.
Yes and no, I don’t have issues with the escalation privileges persé, I have issues with the quoting and because of that I believe that this case should remain open.
A workaround does not mean that is a permanent solution, the quoting issue is still present.