code_junkie

How to start a process from C# (WinForms)

Nov 11th, 2011
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. Process.Start("process.exe"):
  2.  
  3. Process process = new Process();
  4. // Configure the process using the StartInfo properties.
  5. process.StartInfo.FileName = "process.exe";
  6. process.StartInfo.Arguments = "-n";
  7. process.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
  8. process.Start();
  9. process.WaitForExit();// Waits here for the process to ecit.
  10.  
  11. Process.Start("Test.Txt"):
Add Comment
Please, Sign In to add comment