This looks like your Account.cmd
resets RootPath
. Env variables are (session) global, unless you isolate them with setlocal
. To resolve you could change names (as you did) or use setlocal
in your batch files. It's generally good practice anyway as it helps to avoid unexpected/unwanted side effects.
Here is a quote from help setlocal
:
Begins localization of environment changes in a batch file. Environment changes made after SETLOCAL has been issued are local to the batch file. ENDLOCAL must be issued to restore the previous settings. When the end of a batch script is reached, an implied ENDLOCAL is executed for any outstanding SETLOCAL commands issued by that batch script.