"Open in Terminal" from Explorer doesn't load the system PATH variable #18795

Closed
opened 2026-01-31 06:24:31 +00:00 by claunia · 4 comments
Owner

Originally created by @dalemyers on GitHub (Oct 31, 2022).

Windows Terminal version

1.15.2875.0

Windows build number

10.0.22000.0

Other Software

No response

Steps to reproduce

This assumes PowerShell as your default shell. Adjust for cmd as needed.

  1. Go to the start menu and find terminal and launch it. (Or use the run dialog).
  2. Run $Env:Path and see that it lists everything in the users PATH as well as the system PATH
  3. Open any folder in Explorer.
  4. Right click and select "Open in Terminal"
  5. Run $Env:Path and see that it lists only the users PATH.

Expected Behavior

Terminal should behave exactly the same no matter how it is opened.

Actual Behavior

Different PATH variables are loaded depending on where you loaded the terminal from. There appears to be no way to tell either, so some software behaves differently.

Originally created by @dalemyers on GitHub (Oct 31, 2022). ### Windows Terminal version 1.15.2875.0 ### Windows build number 10.0.22000.0 ### Other Software _No response_ ### Steps to reproduce This assumes PowerShell as your default shell. Adjust for cmd as needed. 1. Go to the start menu and find terminal and launch it. (Or use the run dialog). 2. Run `$Env:Path` and see that it lists everything in the users PATH as well as the system PATH 3. Open any folder in Explorer. 4. Right click and select "Open in Terminal" 5. Run `$Env:Path` and see that it lists only the users PATH. ### Expected Behavior Terminal should behave exactly the same no matter how it is opened. ### Actual Behavior Different PATH variables are loaded depending on where you loaded the terminal from. There appears to be no way to tell either, so some software behaves differently.
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 06:24:31 +00:00
Author
Owner

@lhecker commented on GitHub (Nov 2, 2022):

This seems to be duplicated with #12808 and #12602 which in turn seems to be duplicates themselves: https://github.com/microsoft/terminal/issues/12602#issuecomment-1060709230

@zadjii-msft You might have a better feeling which issue to best pick as the one to keep track of.

@lhecker commented on GitHub (Nov 2, 2022): This seems to be duplicated with #12808 and #12602 which in turn seems to be duplicates themselves: https://github.com/microsoft/terminal/issues/12602#issuecomment-1060709230 @zadjii-msft You might have a better feeling which issue to best pick as the one to keep track of.
Author
Owner

@dalemyers commented on GitHub (Nov 3, 2022):

It seems that #12808 is the opposite of this one. It loads system but not user. I see user being loaded but not system.

#12602 could be either way round. Note: this happens to me even if no terminal processes are running, so it's not a WM_SETTINGCHANGE thing.

@dalemyers commented on GitHub (Nov 3, 2022): It seems that #12808 is the _opposite_ of this one. It loads system but not user. I see user being loaded but not system. #12602 could be either way round. Note: this happens to me even if no terminal processes are running, so it's not a WM_SETTINGCHANGE thing.
Author
Owner

@zadjii-msft commented on GitHub (Nov 8, 2022):

Hmm over in https://github.com/microsoft/terminal/issues/13046#issuecomment-1127806813 I linked a bunch more of these.

/dup #12602 looks the closest though

@zadjii-msft commented on GitHub (Nov 8, 2022): Hmm over in https://github.com/microsoft/terminal/issues/13046#issuecomment-1127806813 I linked a bunch more of these. /dup #12602 looks the closest though
Author
Owner

@ghost commented on GitHub (Nov 8, 2022):

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!

@ghost commented on GitHub (Nov 8, 2022): 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!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18795