Thursday, January 25, 2018

a StackOverflow example of running another executable from a C# console app

I have not tried this firsthand. I don't guarantee that it works.

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();

No comments:

Post a Comment