title: How to run CL.exe using Process.Start()?
body: <p>I have following code </p>
  
  <pre><code>using (StreamWriter outfile = new StreamWriter(@"f:\trial.cpp"))
  {
      outfile.Write(txtCode.InnerText);
  }
  
  System.Diagnostics.ProcessStartInfo procStartInfo = new System.Diagnostics.ProcessStartInfo(@"cl.exe", @"  'trial.cpp'");
  
  procStartInfo.RedirectStandardOutput = true;
  procStartInfo.UseShellExecute = false;
  procStartInfo.UserName = "asdasd";
  SecureString secureString = new SecureString();
  foreach (char c in "abcded")
  {
      secureString.AppendChar(c);
  }
  procStartInfo.Password = secureString;
  // Do not create the black window.
  procStartInfo.CreateNoWindow = true;
  procStartInfo.WorkingDirectory = @"f:\";
  // Now we create a process, assign its ProcessStartInfo and start it
  System.Diagnostics.Process proc = new System.Diagnostics.Process();
  proc.StartInfo = procStartInfo;
  proc.Start();
  
  // Get the output into a string
  string result = proc.StandardOutput.ReadToEnd();
  </code></pre>
  
  <p>How to pass file name as parameter? Above code doesn't run and I have tried all full path, different path options.</p>
  
  <p>can anyone help?</p>