title: Execute command and print variable in batch
body: <p>I've got a batch script that sets an environment variable- it's intended that you run the thing and then run extra commands from there.<br>
  Instead I simply need to print the values of the environment variables, without changing the environmnet of the caller.<br>
  I've tried e.g. <code>mybat.bat &amp;&amp; echo %VAR%</code> but it seems that<br>
  a) the value infects the caller and<br>
  b) it only works if you run it repeatedly- presumably something to do with the environment reading the VAR before executing the batch script.</p>
  
  <p>Any suggestions?</p>