How to reload system environment variables into cmd

Z

zlf

How to reload system environment variables into cmd? The scenario is: step
1, run "cmd". 2, change some system environment variables in "system
properties". 3, RELOAD new system environment variables into cmd.

Thank you

zlf
 
P

Pegasus \(MVP\)

zlf said:
How to reload system environment variables into cmd? The scenario is: step
1, run "cmd". 2, change some system environment variables in "system
properties". 3, RELOAD new system environment variables into cmd.

Thank you

zlf

Every Windows child process "inherits" its environment
variables from its parent. After the "birth" of the child
process, there is no further contact with the parent when
it comes to environmental variables. In other words, when
you change some variable in System Properties then they
will NOT be passed on to pre-existing processes.

What are you actually trying to achieve?
 

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