title: Why doesnt this method redirect my output from .exe [ffmpeg]?
body: <p>I have the method:</p>
  
  <pre><code>public static string StartProcess(string exePathArg, string argumentsArg, int timeToWaitForProcessToExit)
      {
          string retMessage = "";
  
          using (Process p = new Process())
          {
              p.StartInfo.FileName = exePathArg;
              p.StartInfo.RedirectStandardOutput = true;
              p.StartInfo.Arguments = argumentsArg;
              p.StartInfo.UseShellExecute = false;
  
  
  
              try
              {
                  p.Start();
                  StreamReader myOutput = p.StandardOutput;
  
                  retMessage = "STANDARD OUTPUT: " +  myOutput.ReadToEnd();
  
                  p.WaitForExit(timeToWaitForProcessToExit);
              }
              catch (Exception ex)
              { 
                  retMessage = "EXCEPTION THROWN: " + ex.ToString();
  
              }
              finally
              {
                  try
                  {
                      p.Kill();
                  }
                  catch { }
              }
          }
  
          return retMessage;
      }
  </code></pre>
  
  <p>But it doesnt redirect my output to retMessage. Anyone any ideas? I tested the arguments in a bat file and output is definitely output.</p>
  
  <p>Cheers,
  Pete</p>