/k argument ignored from 'commandline' setting #2123

Closed
opened 2026-01-30 22:47:23 +00:00 by claunia · 2 comments
Owner

Originally created by @maciek-codes on GitHub (Jun 24, 2019).

Environment

Windows build number: 10.0.18362.207 
Windows Terminal version (if applicable): 0.2.21715.0

Steps to reproduce

I have setenv.bat file in S:\dir.

Add new command in profiles.json:
with "commandline": "cmd.exe **/k S:\\dir\\setenv.bat**", like this:

{
      "acrylicOpacity": 0.75,
      "closeOnExit": true,
      "colorScheme": "Campbell",
      "commandline": "cmd.exe **/k S:\\dir\\setenv.bat**",
      "cursorColor": "#FFFFFF",
      "cursorShape": "bar",
      "fontFace": "Consolas",
      "fontSize": 10,
      "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
      "historySize": 9001,
      "icon": "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png",
      "name": "cmd custom",
      "padding": "0, 0, 0, 0",
      "snapOnInput": true,
      "startingDirectory": "S:\\omaha\\src",
      "useAcrylic": true
    },

Expected behavior

I expect "cmd custom" to launch cmd.exe /k s:\dir\setenv.bat.

Actual behavior

setenv.bat is never launched.

Originally created by @maciek-codes on GitHub (Jun 24, 2019). <!-- 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. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: 10.0.18362.207 Windows Terminal version (if applicable): 0.2.21715.0 ``` # Steps to reproduce I have setenv.bat file in S:\dir. Add new command in profiles.json: with `"commandline": "cmd.exe **/k S:\\dir\\setenv.bat**",` like this: ``` { "acrylicOpacity": 0.75, "closeOnExit": true, "colorScheme": "Campbell", "commandline": "cmd.exe **/k S:\\dir\\setenv.bat**", "cursorColor": "#FFFFFF", "cursorShape": "bar", "fontFace": "Consolas", "fontSize": 10, "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", "historySize": 9001, "icon": "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png", "name": "cmd custom", "padding": "0, 0, 0, 0", "snapOnInput": true, "startingDirectory": "S:\\omaha\\src", "useAcrylic": true }, ``` # Expected behavior I expect "cmd custom" to launch cmd.exe /k s:\dir\setenv.bat. # Actual behavior setenv.bat is never launched.
claunia added the Needs-TriageNeeds-Tag-FixResolution-Answered labels 2026-01-30 22:47:23 +00:00
Author
Owner

@maciek-codes commented on GitHub (Jun 24, 2019):

I think my issue was not replacing the guid field.

@maciek-codes commented on GitHub (Jun 24, 2019): I think my issue was not replacing the guid field.
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 24, 2019):

Cool. Resolved, then?

@DHowett-MSFT commented on GitHub (Jun 24, 2019): Cool. Resolved, then?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#2123