This class can launch a process (like a bat file, perl script, etc) and return all of the StdOut and StdErr to GUI app for display in textboxes, etc.
This class (c) 2003 Michael Mayer Use it as you like (public domain licensing). Please post any bugs / fixes to the page where you downloaded this code.
Inheritance: AsyncOperation
 public void pngserver()
 {
     pingserver = new ProcessCaller(this);
     pingserver.FileName = "pingserver.exe";
     pingserver.WorkingDirectory = "";
     pingserver.Arguments = "";
     pingserver.StdErrReceived += new DataReceivedHandler(writeStreamInfo);
     pingserver.StdOutReceived += new DataReceivedHandler(writeStreamInfo);
     pingserver.Completed += new EventHandler(processCompletedOrCanceled);
     pingserver.Cancelled += new EventHandler(processCompletedOrCanceled);
     pingserver.Start();
 }
 public void logserver()
 {
     loginserver = new ProcessCaller(this);
     loginserver.FileName = "loginserver.exe";
     loginserver.WorkingDirectory = "";
     loginserver.Arguments = "";
     loginserver.StdErrReceived += new DataReceivedHandler(writeLoginStreamInfo);
     loginserver.StdOutReceived += new DataReceivedHandler(writeLoginStreamInfo);
     loginserver.Completed += new EventHandler(loginCompleted);
     loginserver.Cancelled += new EventHandler(loginCanceled);
     loginserver.Start();
     flgLogin = true;
 }
 public void conserver()
 {
     connectionserver = new ProcessCaller(this);
     connectionserver.FileName = "connectionserver.exe";
     connectionserver.WorkingDirectory = "";
     connectionserver.Arguments = "";
     connectionserver.StdErrReceived += new DataReceivedHandler(writeConnStreamInfo);
     connectionserver.StdOutReceived += new DataReceivedHandler(writeConnStreamInfo);
     connectionserver.Completed += new EventHandler(connectionCompleted);
     connectionserver.Cancelled += new EventHandler(connectionCanceled);
     connectionserver.Start();
     flgConnection = true;
 }