updates to windows system and user path not being picked up in terminal windows #7567

Closed
opened 2026-01-31 01:07:28 +00:00 by claunia · 5 comments
Owner

Originally created by @myusrn on GitHub (Apr 22, 2020).

Environment

Windows build number: Microsoft Windows [Version 10.0.19041.207]
Windows Terminal version (if applicable): Version 0.10.781.0

Steps to reproduce

  1. make note of current windows system and user path settings, see win+s | sysdm.cpl | advanced | environment variables | user & system variables | path

  2. install windows terminal | open any terminal type | dump path variable, e.g. cmd = set path | psh = $env.path | wsl2 distro/ubuntu = echo $PATH | note how it contains current windows system and user path settings

  3. make change to windows system and/or user path settings, e.g. add or remove entry(ies)

  4. restart windows terminal | open any terminal type | dump path variable | note how it contains old windows system and user path settings

  5. win+s | apps & features | search list = windows terminal | select windows terminal | advanced options | reset and then repeat step 4 at which point you should see updated windows system and user path settings are in effect but you had to reset windows terminal, and loose any %localappdata%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profile.json customizations in the process. i realize these can be easily restored but having to go through this process every time you update windows system and user path settings is not so optimal.

Expected behavior

expecting new windows terminal tabs or all tabs following a windows terminal app restart should produce terminal sessions containing updated windows system and user path settings

Actual behavior

seeing old windows system and user path settings. it appears windows terminal is reading in these values and locking them in for good versus updating what it uses every time you start a new terminal tab or close and restart entire windows terminal app.

Originally created by @myusrn on GitHub (Apr 22, 2020). # Environment ```none Windows build number: Microsoft Windows [Version 10.0.19041.207] Windows Terminal version (if applicable): Version 0.10.781.0 ``` # Steps to reproduce 1. make note of current windows system and user path settings, see win+s | sysdm.cpl | advanced | environment variables | user & system variables | path 2. install windows terminal | open any terminal type | dump path variable, e.g. cmd = set path | psh = $env.path | wsl2 distro/ubuntu = echo $PATH | note how it contains current windows system and user path settings 3. make change to windows system and/or user path settings, e.g. add or remove entry(ies) 4. restart windows terminal | open any terminal type | dump path variable | note how it contains old windows system and user path settings 5. win+s | apps & features | search list = windows terminal | select windows terminal | advanced options | reset and then repeat step 4 at which point you should see updated windows system and user path settings are in effect but you had to reset windows terminal, and loose any %localappdata%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profile.json customizations in the process. i realize these can be easily restored but having to go through this process every time you update windows system and user path settings is not so optimal. # Expected behavior expecting new windows terminal tabs or all tabs following a windows terminal app restart should produce terminal sessions containing updated windows system and user path settings # Actual behavior seeing old windows system and user path settings. it appears windows terminal is reading in these values and locking them in for good versus updating what it uses every time you start a new terminal tab or close and restart entire windows terminal app.
claunia added the Resolution-Duplicate label 2026-01-31 01:07:28 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 22, 2020):

Thanks for the comprehensive report! This is a /dupe of #1125

@DHowett-MSFT commented on GitHub (Apr 22, 2020): Thanks for the comprehensive report! This is a /dupe of #1125
Author
Owner

@ghost commented on GitHub (Apr 22, 2020):

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 (Apr 22, 2020): 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

@myusrn commented on GitHub (Apr 22, 2020):

@DHowett-MSFT - note that #1125 suggests this is addressed by just starting a new tab or restarting windows terminal but that doesn't match what i'm able to repro. I have to reset windows terminal app in apps & feature to get updated path environment variable settings to be used.

@myusrn commented on GitHub (Apr 22, 2020): @DHowett-MSFT - note that #1125 suggests this is addressed by just starting a new tab or restarting windows terminal but that doesn't match what i'm able to repro. I have to reset windows terminal app in apps & feature to get updated path environment variable settings to be used.
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 22, 2020):

If that's happening, your machine is perhaps broken. There is no connection in the application model between the reset state of an application and the environment variables it inherits from its parent. If that's happening, the WM_SETTINGCHANGE message isn't being sent to any other applications.

@DHowett-MSFT commented on GitHub (Apr 22, 2020): If that's happening, your machine is perhaps broken. There is no connection in the application model between the reset state of an application and the environment variables it inherits from its parent. If that's happening, the `WM_SETTINGCHANGE` message isn't being sent to _any_ other applications.
Author
Owner

@myusrn commented on GitHub (Apr 22, 2020):

Yes i just retested and i can successfully get windows terminal to pickup system and user path changes by simply closing the app and restarting it. It seems that previously I was going straight from testing new tabs to testing using apps & features | windows terminal | advanced options | reset and was skipping over closing out and restarting windows terminal app.

@myusrn commented on GitHub (Apr 22, 2020): Yes i just retested and i can successfully get windows terminal to pickup system and user path changes by simply closing the app and restarting it. It seems that previously I was going straight from testing new tabs to testing using apps & features | windows terminal | advanced options | reset and was skipping over closing out and restarting windows terminal app.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7567