0

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.

  • It's not clear what you're asking here. What do you mean by "current environment?" – Peter Ruderman May 05 '17 at 00:26
  • 1
    If 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

0 Answers0