title: Redirect the output (stdout, stderr) of a child process to the Output window in Visual Studio
body: <p>At the moment I am starting a batch file from my C# program with:</p>
  
  <pre><code>System.Diagnostics.Process.Start(@"DoSomeStuff.bat");
  </code></pre>
  
  <p>What I would like to be able to do is redirect the output (stdout and stderr) of that child process to the Output window in Visual Studio (specifically Visual C# Express 2008).</p>
  
  <p>Is there a way to do that?</p>
  
  <p>(Additionally: such that it's not all buffered up and then spat out to the Output window when the child process finishes.)</p>
  
  <hr>
  
  <p>(BTW: At the moment I can get stdout (but not stderr) of the <em>parent</em> process to appear in the Output window, by making my program a "Windows Application" instead of a "Console Application". This breaks if the program is run outside Visual Studio, but this is ok in my particular case.)</p>