in reply to exec problem
But I'm not sure why you're using env. What does it buy you that simply setting %ENV and continuing with the rest of the script, wouldn't?