title: Windows CLI: Run command from within another command
body: <p>I am trying to write a command-line script that will be triggered each time an event log in a specific Windows Event Log is logged. Here's what I have so far:</p>
  
  <pre><code>wevtutil qe WebsitePanel "/q:*" /f:text /rd:true /c:1 &gt; %tmp%\WebsitePanelErrorLog.log
  
  set var1 = &lt; %tmp%\ErrorLog.log
  
  C:\bmail.exe -s aspmx.l.google.com -t cmiller@6ps.com -f notifications@6ps.com -a "wh00: WebsitePanel Event Logged" -b %var1%
  
  del %tmp%\WebsitePanelErrorLog.log
  </code></pre>
  
  <p>The problem is var1 is not being set for some reason. If I do this, it just returns empty:</p>
  
  <pre><code>echo %var1%
  </code></pre>
  
  <p>Any ideas?</p>