I need my app to execute another app via the command line. How can I do this?
Printable View
I need my app to execute another app via the command line. How can I do this?
PHP Code:using System.Diagnostics;
// ....
Process p = new Process();
p.StartInfo = new ProcessStartInfo("C:\\\\myapp.exe","-myarguments");
//go!
p.Start();
// if i want to retrieve an exit code..
p.WaitForExit();
MessageBox.Show("Applcation returned Exit Code: " + p.ExitCode.ToString());