Refresh Environment Variables

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?
 
P

Pegasus \(MVP\)

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%
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top