CMD Tab Label Contains Batch File Name Forever If Batch File Has An Error #5632

Closed
opened 2026-01-31 00:17:51 +00:00 by claunia · 1 comment
Owner

Originally created by @LeeThompson on GitHub (Dec 18, 2019).

Environment

Windows build number: 10.0.18363.535
Windows Terminal version (if applicable): 0.7.3451.0

Any other software? Batch file that terminates with an error (overflow, missing label, etc.)

Steps to reproduce

Run a batch file that terminates with an error (missing label, etc.)

Expected behavior

The Windows Terminal tab title should revert to just "cmd" instead of staying "cmd - batchfilename.bat"

Actual behavior

When the batch file terminates due to an error, the Windows Terminal tab remains "cmd - batchfilename.bat"

I've included a sample batch file to reproduce the error:

@echo off
goto :wibble

test.zip

Originally created by @LeeThompson on GitHub (Dec 18, 2019). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: 10.0.18363.535 Windows Terminal version (if applicable): 0.7.3451.0 Any other software? Batch file that terminates with an error (overflow, missing label, etc.) ``` # Steps to reproduce Run a batch file that terminates with an error (missing label, etc.) # Expected behavior The Windows Terminal tab title should revert to just "cmd" instead of staying "cmd - _batchfilename_.bat" # Actual behavior When the batch file terminates due to an error, the Windows Terminal tab remains "cmd - _batchfilename_.bat" I've included a sample batch file to reproduce the error: ``` @echo off goto :wibble ``` [test.zip](https://github.com/microsoft/terminal/files/3977144/test.zip)
Author
Owner

@zadjii-msft commented on GitHub (Dec 18, 2019):

Unfortunately, this is just a part of how cmd works. It definitely feels like a bug, but cmd is parked indefinitely. Undoubtedly, there's some software out there that depends upon this (broken) behavior, and we won't be able to change this.

EDIT:
Note that it repros even outside the Windows Terminal:
image

@zadjii-msft commented on GitHub (Dec 18, 2019): Unfortunately, this is just a part of how `cmd` works. It definitely feels like a bug, but `cmd` is parked indefinitely. Undoubtedly, there's some software out there that depends upon this (broken) behavior, and we won't be able to change this. EDIT: Note that it repros even outside the Windows Terminal: ![image](https://user-images.githubusercontent.com/18356694/71091154-3523a580-216a-11ea-887c-fb03e021de49.png)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5632