Auto-generated Developer Command Prompt/PowerShell profiles don't really work #15651

Closed
opened 2026-01-31 04:44:26 +00:00 by claunia · 6 comments
Owner

Originally created by @DJackman123 on GitHub (Oct 22, 2021).

Windows Terminal version (or Windows build number)

1.12.2931.0

Other Software

I have VS 2019 and 2022 (preview) installed.

Steps to reproduce

Install Windows Terminal so it auto-generates profiles for Developer Command Prompt and Developer PowerShell for the installed versions of Visual Studio.
Open Windows Terminal and open a tab with the Developer Command Prompt profile.
Execute the command: where MSBuild

Expected Behavior

MSBuild should be in the path, but it's not so the command can't be found

Actual Behavior

The auto-generated profile just starts cmd.exe or pwsh.exe in a specific folder, but it doesn't actually run the script to start the developer session like the installed shortcut does.
I also noticed that the Developer Command Prompt profile is set to use pwsh.exe instead of cmd.exe. That seems wrong. Is that because my default profile uses pwsh.exe?

Originally created by @DJackman123 on GitHub (Oct 22, 2021). ### Windows Terminal version (or Windows build number) 1.12.2931.0 ### Other Software I have VS 2019 and 2022 (preview) installed. ### Steps to reproduce Install Windows Terminal so it auto-generates profiles for Developer Command Prompt and Developer PowerShell for the installed versions of Visual Studio. Open Windows Terminal and open a tab with the Developer Command Prompt profile. Execute the command: where MSBuild ### Expected Behavior MSBuild should be in the path, but it's not so the command can't be found ### Actual Behavior The auto-generated profile just starts cmd.exe or pwsh.exe in a specific folder, but it doesn't actually run the script to start the developer session like the installed shortcut does. I also noticed that the Developer Command Prompt profile is set to use pwsh.exe instead of cmd.exe. That seems wrong. Is that because my default profile uses pwsh.exe?
claunia added the Resolution-Duplicate label 2026-01-31 04:44:26 +00:00
Author
Owner

@DHowett commented on GitHub (Oct 22, 2021):

Wow, this is a huge footgun!

I'm betting you have profiles.defaults.commandline set to pwsh.exe. Is that so?

profiles.defaults is a block of settings that overrides all generated profiles and all built-in profiles. If you have WSL installed, those profiles will also launch whatever is specified in profiles.defaults.commandline.

@DHowett commented on GitHub (Oct 22, 2021): _Wow_, this is a huge footgun! I'm betting you have `profiles.defaults.commandline` set to `pwsh.exe`. Is that so? `profiles.defaults` is a block of settings that overrides *all* generated profiles and all built-in profiles. If you have WSL installed, those profiles will _also_ launch whatever is specified in `profiles.defaults.commandline`.
Author
Owner

@DHowett commented on GitHub (Oct 22, 2021):

(The naming is somewhat confusing, and that's something we should work on. defaults are default settings for any profile, and defaultProfile is the profile that launches by default and from the unadorned New Tab button)

@DHowett commented on GitHub (Oct 22, 2021): (The naming is somewhat confusing, and that's something we should work on. `defaults` are default _settings_ for any profile, and `defaultProfile` is the profile that launches by default and from the unadorned New Tab button)
Author
Owner

@DJackman123 commented on GitHub (Oct 23, 2021):

Why, yes, I do have the profiles.defaults.commandline setting set to pwsh.exe. My understanding was that the profiles.defaults settings were applied whenever a profile was being used and didn't have that particular item set. It seems odd that it would also override the setting for generated and built-in profiles. Is this behavior the kind of thing that makes sense for some settings (like padding or font) but not for other settings like commandline?

@DJackman123 commented on GitHub (Oct 23, 2021): Why, yes, I do have the `profiles.defaults.commandline` setting set to `pwsh.exe`. My understanding was that the `profiles.defaults` settings were applied whenever a profile was being used and didn't have that particular item set. It seems odd that it would also override the setting for generated and built-in profiles. Is this behavior the kind of thing that makes sense for some settings (like padding or font) but not for other settings like commandline?
Author
Owner

@carlos-zamora commented on GitHub (Feb 8, 2023):

Fixed by #12906

/dup #12842

@carlos-zamora commented on GitHub (Feb 8, 2023): Fixed by #12906 /dup #12842
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Feb 8, 2023):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@microsoft-github-policy-service[bot] commented on GitHub (Feb 8, 2023): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Author
Owner

@DHowett commented on GitHub (Feb 8, 2023):

You know, it isn't fixed by that PR... Sorry about that. However: we've removed the footgun from the UI. Whether the JSON model allows for that flexibility is more of an academic discussion 😄

@DHowett commented on GitHub (Feb 8, 2023): You know, it _isn't_ fixed by that PR... Sorry about that. However: we've removed the footgun from the UI. Whether the JSON model allows for that flexibility is more of an academic discussion :smile:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15651