title: How do I redirect output to a file with CreateProcess?
body: <p>I tried using CreateProcess to run a simple command like <code>hg &gt; test.txt</code>. I tried running the string as a whole (as opposed to separating it into an application name and its parameters). Why does <code>CreateProcess(0, "notepad.exe test.txt", ...)</code> work but <code>CreateProcess(0, "hg &gt; test.txt", ...)</code> does not?</p>