Profile Shortcut fails to open with .cmd file #5362

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

Originally created by @SamuelDev on GitHub (Dec 3, 2019).

Environment

Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]
Windows Terminal version (if applicable): 0.7.3291.0

Any other software?
.cmd file

Steps to reproduce

  1. Create file named test.cmd
  2. Add some command to the file
  3. Create a terminal profile with the startingDirectory variable pointed to the folder of the cmd file, and the commandLine variable equal to the name of the file (test.cmd)
  4. Attempt to open the profile in terminal

Expected behavior

Expected behavior is to open the cmd file and execute the commands within the file.

Actual behavior

Actual behavior is the terminal flashes like it quickly opened and closed the file. 2 weeks ago it would open the file and keep it open while executing the exact same commands. (the script I am using stays open until it is manually closed).

Originally created by @SamuelDev on GitHub (Dec 3, 2019). # Environment ```none Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd] Windows Terminal version (if applicable): 0.7.3291.0 Any other software? .cmd file ``` # Steps to reproduce 1. Create file named test.cmd 2. Add some command to the file 3. Create a terminal profile with the startingDirectory variable pointed to the folder of the cmd file, and the commandLine variable equal to the name of the file (test.cmd) 4. Attempt to open the profile in terminal # Expected behavior Expected behavior is to open the cmd file and execute the commands within the file. # Actual behavior Actual behavior is the terminal flashes like it quickly opened and closed the file. 2 weeks ago it would open the file and keep it open while executing the exact same commands. (the script I am using stays open until it is manually closed).
claunia added the Resolution-By-DesignNeeds-Tag-Fix labels 2026-01-31 00:11:31 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Dec 3, 2019):

Sorry -- this is now by design. Terminal will no longer execute files from the startingDirectory directly. You can either set commandline: "%COMSPEC% /c test.cmd" or specify a full path to test.cmd.

@DHowett-MSFT commented on GitHub (Dec 3, 2019): Sorry -- this is now by design. Terminal will no longer execute files from the `startingDirectory` directly. You can either set `commandline: "%COMSPEC% /c test.cmd"` or specify a full path to test.cmd.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5362