title: Why GUI application blocks a batch file?
body: <p>There are many references on Internet claiming that one of differences between a GUI and a console application is that running the GUI application from a batch file does not block its execution, while running the console application does block it.</p>
  
  <p>Few of many references, these are particularly from SO/SE:  </p>
  
  <ul>
  <li><a href="https://stackoverflow.com/q/17218338/850848">How can I get an MFC application to block from the command line?</a></li>
  <li><a href="https://stackoverflow.com/q/8177695/850848">How to wait for a process to terminate to execute another process in batch file</a></li>
  <li><a href="https://serverfault.com/q/245393/168875">How do you wait for an exe to complete in batch file?</a></li>
  <li><a href="https://superuser.com/q/465985/213663">Run a program in a batch script and wait for it to finish before continuing</a></li>
  </ul>
  
  <p>Moreover, I myself remember this is/was true.</p>
  
  <p>Yet it does not seem to work this way.</p>
  
  <p>I've tested this on a simple batch file like:</p>
  
  <pre><code>echo Pre
  notepad
  echo Post
  </code></pre>
  
  <p>The <code>Post</code> is not printed until I close notepad. Why, when a notepad is clearly a GUI application?</p>
  
  <p>I've tested this on Windows 8, 7, and XP just to rule out a possibility that the behavior has changed in recent versions of Windows. I've tried to disable command extensions as one of possible culprits too.</p>