title: How do I get and print value of an environment variable?
body: <p>I want to print value from a Windows environment variable, say, path or errorlevel, I've tried <a href="http://msdn.microsoft.com/en-us/library/99at5bh3.aspx" rel="nofollow noreferrer">this</a> but it doesn't work. Output this in my console:</p>
  
  <p><em>(without consider spaces/tabs which it outputs):</em></p>
  
  <pre><code>echo %PATH
  %PATH
  </code></pre>
  
  <p><strong>Makefile:</strong></p>
  
  <pre><code>PATH=$(PATH);\nonesuch
  
  all:
      echo %PATH%
  </code></pre>
  
  <p><strong>command-line:</strong></p>
  
  <pre><code>nmake /E
  </code></pre>
  
  <p>How do I fix it?</p>
  
  <p><em>NOTE: Visual Studio's binary path is in my PATH variable, that's why I'm calling this outside VS console</em></p>