title: Assign command output to variable in batch file
body: <p>I'm trying to assign the output of a command to a variable - as in, I'm trying to set the current flash version to a variable. I know this is wrong, but this is what I've tried:</p>
  
  <pre><code>set var=reg query hklm\SOFTWARE\Macromedia\FlashPlayer\CurrentVersion&gt;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>reg query hklm\SOFTWARE\Macromedia\FlashPlayer\CurrentVersion &gt;&gt; set var
  </code></pre>
  
  <p>Yeah, as you can see I'm a bit lost. Any and all help is appreciated!</p>