Refresh Environment Variables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

ACTION:
I am updating existing environment variables to a new value using the setx
resource kit command on many servers.

PROBLEM:
Is the change doens't take effect until a reboot. I do see the change in
the registry keys though.

QUESTION:
How do I refresh the environment variables without rebooting the windows box?
 
Ben said:
ACTION:
I am updating existing environment variables to a new value using the setx
resource kit command on many servers.

PROBLEM:
Is the change doens't take effect until a reboot. I do see the change in
the registry keys though.

QUESTION:
How do I refresh the environment variables without rebooting the windows
box?

Changes made by setx.exe have no effect on existing processes -
they are only visible to processes you launch AFTER running setx.
Try this sequence:
1. Start a Command Prompt.
2. Run setx TestVariable something
3. Start a second Commend Prompt.
4. echo TestVariable=%TestVariable%
 
Back
Top