System.Diagnostics.ProcessStartInfo
http://msdn.microsoft.com/library/d...stemdiagnosticsprocessstartinfoclasstopic.asp
following example is from:
http://www.csharpfriends.com/Forums/ShowPost.aspx?PostID=35176
public static void Main(){
ShellRun("c:\progfiles\winace\winace.exe", "A C:\myfiles\*.*
c:\mypacketfile.ace")
}
//exefile is the path to the executable.
//pars is all the parameters you use
public static int ShellRun(string exefile, string pars){
System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
myProcess.StartInfo.FileName = exefile;
myProcess.StartInfo.Arguments = pars;
myProcess.StartInfo.WindowStyle =
System.Diagnostics.ProcessWindowStyle.Visible; //use .Hidden if you dont
want to see anything
myProcess.StartInfo.UseShellExecute = false;
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();
myProcess.WaitForExit(60000); //60 sec timeout
return myProcess.ExitCode; //Returns exit code
}