title: if statement with multiple command block in a batch script
body: <p>I am new to batch scripting and have been working with simple IF-ELSE statements. But when I use a block of multiple commands in IF condition, only the first command is skipped the other commands are executed. I cannot understand this behavior. If the condition is false, it should skip the entire command block and execute else part. Am I missing something? Here is my script:</p>
  
  <pre><code>@echo off
  REM Beginning of the Script
  SETLOCAL ENABLEEXTENSIONS
  SETLOCAL ENABLEDELAYEDEXPANSION
  
  if exist "C:\Program Files (x86)" ( 
      echo 64-bit Windows... 
      echo 2nd line
      echo 3rd line 
  ) ELSE ( 
      echo 32-bit Windows...
  )
  </code></pre>
  
  <p>The output on a 32-bit machine is:</p>
  
  <pre><code>2nd line
  3rd line
  32-bit Windows...
  </code></pre>