title: redirecting stdout to a file question?
body: <p>Hi why am I getting a access denied error when I try to execute this process?
  I am running (MSBuild "projectfile here" "additional args") command with this new process</p>
  
  <pre><code>public bool CmdExecute(string command,string args)
       {
  
  
  
            bool isOk = true;
           try
           {
               using (System.Diagnostics.Process proc = new System.Diagnostics.Process())
               {
  
                   proc.EnableRaisingEvents = false;
                   proc.StartInfo.UseShellExecute = false;
                   proc.StartInfo.RedirectStandardOutput = true;
                   proc.StartInfo.FileName = command;
                   proc.StartInfo.Arguments = args;
  
                  // Console.Out.WriteLine(proc.StartInfo.Arguments);
  
                   proc.Start();
                   string output = proc.StandardOutput.ReadToEnd();
                 proc.WaitForExit();
                 Console.WriteLine(output);
               }
  
               }
           }
           catch(Exception e)
           {
              Console.WriteLine(e.Message);
               isOk = false;
           }
           return isOk;   
       }
  </code></pre>