REM run the script that sets environment variable FOO call foo.bat REM now %FOO% is set in the environment REM Corion;s suggestion: if you need the entire environment REM set called by itself dumps one line each VAR=VALUE set