title: Calling `ver` in FOR expression from a batch file freezes cmd in Windows 10
body: <p>I am trying to check OS version from a batch file and I am running into the following problem.</p>
  
  <p>The line</p>
  
  <pre><code>FOR /F "tokens=*" %%i IN ('ver') DO (SET var=%%i)
  </code></pre>
  
  <p>will freeze the cmd when executing from a batch file while the command <code>ver</code> by itself (in the same batch file) executes without problem. (<code>ver</code> has the following output.)</p>
  
  <pre><code>Microsoft Windows [Version 10.0.18362.356]
  </code></pre>
  
  <p>What could be wrong in the expression?</p>