Skip to content

fix: Windows Terminal launch fails on non-English systems#13551

Open
SiinXu wants to merge 1 commit intomainfrom
fix/windows-terminal-profile-name
Open

fix: Windows Terminal launch fails on non-English systems#13551
SiinXu wants to merge 1 commit intomainfrom
fix/windows-terminal-profile-name

Conversation

@SiinXu
Copy link
Collaborator

@SiinXu SiinXu commented Mar 17, 2026

Summary

  • Remove hardcoded profile name from Windows Terminal launch args
  • On localized Windows (e.g. Chinese), the profile is named differently, causing error 0x80070002
  • Also remove extra quotes around bat file path

Fix

Use default Windows Terminal profile instead of hardcoding English profile name.

Closes #13550

Test plan

  • Windows Terminal on English Windows
  • Windows Terminal on Chinese Windows (previously failed)
  • PowerShell / Command Prompt: no regression

…non-English systems

The `-p "Command Prompt"` flag fails on localized Windows (e.g. Chinese "命令提示符").
Use default profile instead and fix extra quoting of bat file path.

Closes #13550

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@DeJeune DeJeune requested a review from GeorgeDong32 March 17, 2026 11:59
@GeorgeDong32
Copy link
Collaborator

GeorgeDong32 commented Mar 17, 2026

Note

This comment was translated by Claude.

It may not be entirely a profile issue, the problem is that the profile wasn't "quoted". #13400 should be able to fix it. If removed, if the user's Windows Terminal default profile is wsl, it might not start cmd. I'll try it again tonight.


Original Content

可能不完全是 profile 这个问题,是 profile 没有 "quote" 起来。 #13400 应该能修掉,去掉的话如果用户 Windows Terminal 默认profile是wsl可能会启动不了cmd,我晚上再试试

@SiinXu
Copy link
Collaborator Author

SiinXu commented Mar 17, 2026

Note

This comment was translated by Claude.

Thank you for the feedback! You make a good point. Removing -p does carry risk—if the user's default profile is WSL, cmd won't start.

Looking at the changes in #13400, simply removing the extra quotes while keeping -p "Command Prompt" is a safer approach. If #13400 verifies that this fixes the issue, this PR can be closed.

However, I have one question: if the root cause is just the quotes issue, can -p "Command Prompt" find the corresponding profile on a Chinese system? Is the default profile name in the Chinese version of Windows Terminal "命令提示符", or is the internal ID still in English? I'll wait for your verification results tonight.


Original Content

感谢反馈!你说的有道理,去掉 -p 确实有风险——如果用户默认 profile 是 WSL 就启动不了 cmd。

看了 #13400 的改动,只去掉多余引号、保留 -p "Command Prompt" 是更稳妥的方案。如果 #13400 验证能修复这个问题,这个 PR 就可以关掉了。

不过有一个疑问:如果根因只是引号问题,那在中文系统上 -p "Command Prompt" 能找到对应 profile 吗?Windows Terminal 中文版的默认 profile 名是 "命令提示符",还是说内部 ID 还是英文的?等你晚上验证结果。

@GeorgeDong32
Copy link
Collaborator

GeorgeDong32 commented Mar 17, 2026

Note

This comment was translated by Claude.

command prompt has internal mapping, and the fix from #13400 works fine on my Chinese Windows. I'll test other scenarios later.


Original Content

command prompt 有内部映射,我这边中文版 Windows 用 #13400 的修复是正常的,晚点我再测测其它情况

@MengXiangxi
Copy link
Contributor

@DeJeune This is the issue we privately discussed on WeChat. I am tagging you to bring it to your attention, as you may be working on the same issue, or at least have been looking into this.

Hope it helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows Terminal launch fails with error 0x80070002 due to hardcoded profile name

3 participants