I have a script that does something like
setx %PATH% %PATH%;%ANOTHER_VAR% echo %PATH%
When I echo the path, it does not include %ANOTHER_VAR%. is there a way to ensure the new variables are reflected the second time I echo %PATH%
EDIT: I'm writing a puppet script that calls 2 separate exec commands. The first calls setx on a variable. Since the second one is accessed in a new exec command, I would expect it to have access to the newly set variable, but it does not.
I have also tried just creating a variable in script1 and accessing that from script2, but it's not accessible (as expected).