title: CMD Script Errorlevel Misbehavior with IF statement
body: <p>Expected outcome of the following script: PERMPING if user presses P, or PINGLOOP if user presses T. However, no matter what the user presses, the script echos <strong>both</strong>. Any idea what gives?</p>
  
  <pre><code>CHOICE /C:PT /N /M "Ping permanently (P) or temporarily (T) (%pingTimes% times)?"
  echo %ERRORLEVEL%
  IF ERRORLEVEL 1 ECHO PERMPING
  IF ERRORLEVEL 2 ECHO PINGLOOP
  </code></pre>