setx does not set variables in the current environment. I want to set an environment variable and immediately use it. Can this be done? thx.
Asked
Active
Viewed 31 times
0
-
It's not clear what you're asking here. What do you mean by "current environment?" – Peter Ruderman May 05 '17 at 00:26
-
1If you're talking about a command shell or batch script, use the `set` command. From a Win32 application, use `SetEnvironmentVariable`. Some language runtimes may also have their own set of environment variables, you will need to be more specific. – Harry Johnston May 05 '17 at 00:36