environment variable changes (like PATH) are not applied during runtime #7124

Closed
opened 2026-01-31 00:55:47 +00:00 by claunia · 3 comments
Owner

Originally created by @claudenobs on GitHub (Mar 24, 2020).

Environment

Windows build number:  Win32NT             10.0.18363.0 Microsoft Windows NT 10.0.18363.0
Windows Terminal Version: 0.10.781.0

Steps to reproduce

  1. echo $env:Path
  2. change environment variables using Control Panel > System > ...
  3. open new powershell tab
  4. echo $env:Path

Expected behavior

environment variable change is reflected in :

  • new powershell tab
  • currently open poweshell tabs

Actual behavior

environment variable change is only reflected after closing & reopening microsoft terminal application

Originally created by @claudenobs on GitHub (Mar 24, 2020). # Environment ```none Windows build number: Win32NT 10.0.18363.0 Microsoft Windows NT 10.0.18363.0 Windows Terminal Version: 0.10.781.0 ``` # Steps to reproduce 1) echo $env:Path 2) change environment variables using Control Panel > System > ... 3) open new powershell tab 4) echo $env:Path # Expected behavior environment variable change is reflected in : - new powershell tab - currently open poweshell tabs # Actual behavior environment variable change is only reflected after closing & reopening microsoft terminal application
claunia added the Resolution-Duplicate label 2026-01-31 00:55:47 +00:00
Author
Owner

@creativenull commented on GitHub (Mar 24, 2020):

I am also getting this issue. Steps I followed:

  • Keep the powershell tab open
  • Add a new environment variable via control panel: PROJECTS set to D:\projects
  • Close the current powershell tab and open a new one
  • Check if the variable is set: echo $env:PROJECTS
  • I get no value back.

However, closing the terminal window and re-opening solves the issue. But not really a solution if you have multiple tabs open.

@creativenull commented on GitHub (Mar 24, 2020): I am also getting this issue. Steps I followed: + Keep the powershell tab open + Add a new environment variable via control panel: `PROJECTS` set to `D:\projects` + Close the current powershell tab and open a new one + Check if the variable is set: `echo $env:PROJECTS` + I get __no__ value back. However, closing the terminal window and re-opening solves the issue. But not really a solution if you have multiple tabs open.
Author
Owner

@DHowett-MSFT commented on GitHub (Mar 24, 2020):

/dup #1125

@DHowett-MSFT commented on GitHub (Mar 24, 2020): /dup #1125
Author
Owner

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

No dependencies set.

Reference: starred/terminal#7124