- Can you pass arguments?
- Can you get the exit code back?
views:
163answers:
3
+6
A:
Yes, yes and yes. See the System.Diagnostics.Process
class.
Henk Holterman
2009-12-02 13:38:52
+11
A:
Like this:
var proc = new Process();
proc.StartInfo.FileName = "something.exe";
proc.StartInfo.Arguments = "-v -s -a";
proc.Start();
proc.WaitForExit();
var exitCode = proc.ExitCode;
proc.Close();
Jonas Lincoln
2009-12-02 13:44:07
+1, just missed arguments part
Rubens Farias
2009-12-02 13:55:06
Yes, of course. I'll edit and add.
Jonas Lincoln
2009-12-02 13:57:22