0

I am trying to set the following environment variable , and invoking a .exe file . This particular takes the value of the variable and creates metadata files.

But the value set while running the batch is only reflect if i run it the second time . Is there a way to reflect the environment variable change immediately?

Following is the sample

setx -m USER_HOME "D:\\user_home"

start "" C:\\sample.exe
Sam
  • 1,298
  • 6
  • 30
  • 65

1 Answers1

0

Restarting explorer.exe might be enough. Try taskkill /f /im explorer.exe and start it again using explorer.exe after setting your variable.

MichaelS
  • 5,941
  • 6
  • 31
  • 46