Launching a process in C# and passing an xml file
<p>I have the following code to run a cmd line based solver.  </p>

<pre><code>//Create process
        var pProcess = new System.Diagnostics.Process();

        //strCommand is path and file name of command to run
        const string strCommand = // where .bat file is
        pProcess.StartInfo.FileName = strCommand;

        //strCommandParameters are parameters to pass to program
        string strCommandParameters = " -xml '" + xmlFile +"'";
        pProcess.StartInfo.Arguments = strCommandParameters;

        pProcess.StartInfo.UseShellExecute = false;

        //Set output of program to be written to process output stream
        pProcess.StartInfo.RedirectStandardOutput = true;

        //Start the process
        pProcess.Start();

        //Get program output
        this.StrOutput = pProcess.StandardOutput.ReadToEnd();

        //Wait for process to finish
        pProcess.WaitForExit();
</code></pre>

<p>When I run it as is it exceptions out that it cannot find the file I am passing to it, when I comment out the UseShellExecute and RedirectStandardOutput it runs as expected but does not feed the information to my this.StrOutput, when I comment out the useShellExecute the redirect complains that the useShellExecute is not set to false.  How can I feed in my .xml correctly, and have the information from the cmd line feed into my strOutput successfully?</p>
