title: Batch closes prematurely on a for /f command
body: <p>I have a batch file (in windows XP, with command extension activated) with the following line:</p>
  
  <pre><code>for /f %%s in ('type version.txt') do set VERSION=%%s
  </code></pre>
  
  <p>On some computer, it works just fine (as illustrated by <a href="https://stackoverflow.com/questions/130116/dos-batch-commands-to-read-first-line-from-text-file">this SO question</a>), but on other <strong>it kills cmd</strong> (the console window just closes)</p>
  
  <p>Why ?</p>
  
  <hr>
  
  <p>Note: the computers seem to have a similar configuration: XpSP2, the user has administrative right, no 'Command processor" defined in HKEY_CURRENT_USER\Software\Microsoft\Command Processor...</p>