title: Assign output of a program to a variable using a MS batch file
body: <p>I need to assign the output of a program to a variable using a MS batch file.</p>
  <p>So in GNU Bash shell I would use <code>VAR=$(application arg0 arg1)</code>. I need a similar behavior in Windows using a batch file.</p>
  <p>Something like <code>set VAR=application arg0 arg1</code>.</p>
  <h3>Similar Questions</h3>
  <ul>
  <li><a href="https://stackoverflow.com/q/6359820/">How to set commands output as a variable in a batch file</a></li>
  <li><a href="https://stackoverflow.com/q/108439/">How do I get the result of a command in a variable in windows?</a></li>
  <li><a href="https://stackoverflow.com/q/889518/">Set the value of a variable with the result of a command in a Windows batch file</a></li>
  <li><a href="https://stackoverflow.com/q/14952295/">Set output of a command as a variable (with pipes)</a></li>
  <li><a href="https://stackoverflow.com/q/16203629/">Assign command output to variable in batch file</a></li>
  </ul>