title: Command line string Variable comparison
body: <p>I've been trying to compare my computername to some pre-set string. From reading around on google, namely <a href="http://commandwindows.com/batchfiles-branching.htm" rel="nofollow noreferrer">http://commandwindows.com/batchfiles-branching.htm</a>, I've attempted the following and many variants of the same line with <code>/I</code>, <code>"%ComputerName"</code>, <code>A513242</code> etc</p>
  
  <pre><code>IF (%ComputerName% == "A513242") (
    EXIT) ELSE (
      ECHO "else taken")
  </code></pre>
  
  <p>where "A513242" is the result of calling <code>ECHO %ComputerName%</code>
  this seems to always take the "else taken" branch.</p>
  
  <p>Any help as to why the (<code>EXIT</code>) case is not being taken/ what syntactical mistake I am making would be appreciated.</p>