Fixed .cmd scripts to not alter env variables after exit.