I would like to write a program that sets an environment variable in an instance of the shell (cmd.exe) it was called from. The idea is that I could store some state in thi
A common techniques is the write an env file, that is then "call"ed from the script.
del env.var foo.exe ## writes to env.var call env.var