title: Difference between environment variable value for "ECHO %foo%" versus "%foo%"
body: <p>What is the difference between</p>
  
  <pre><code>ECHO %foo%
  </code></pre>
  
  <p>and simply </p>
  
  <pre><code>%foo%
  </code></pre>
  
  <p>In my case the first prints <code>x</code> and the second prints <code>y</code>, where the "correct" value, the one I want to be returned through <code>Environment.GetEnvironmentVariable("foo")</code> is the <code>ECHO</code>ed one, <code>x</code>. </p>
  
  <p>I can't figure out how to fix <code>y</code> to be <code>x</code>. When I run</p>
  
  <pre><code>SET
  </code></pre>
  
  <p>I see</p>
  
  <pre><code>foo=x
  </code></pre>
  
  <p>which is what I expect. Where is <code>y</code> coming from?</p>