J Justin Oct 13, 2004 #1 How do you invoke other applications with or without command line arguments?
D Dennis Myrén Oct 13, 2004 #2 This will help you to learn how to start another process: public static void RunProcess ( string filename, string [] input, bool hide, object startArgs ) { ProcessStartInfo pi = new ProcessStartInfo(filename); pi.UseShellExecute = false; pi.RedirectStandardInput = true; pi.RedirectStandardOutput = false; pi.RedirectStandardError = false; pi.CreateNoWindow = hide; if (nulll != startArgs) pi.Arguments = startArgs.ToString(); Process p = new Process(); p.StartInfo = pi; p.Start(); StreamWriter w = p.StandardInput; w.AutoFlush = true; for (int i = 0x0; i < input.Length; i ++) w.WriteLine(input ); w.Close(); p.Close(); p.Dispose(); }
This will help you to learn how to start another process: public static void RunProcess ( string filename, string [] input, bool hide, object startArgs ) { ProcessStartInfo pi = new ProcessStartInfo(filename); pi.UseShellExecute = false; pi.RedirectStandardInput = true; pi.RedirectStandardOutput = false; pi.RedirectStandardError = false; pi.CreateNoWindow = hide; if (nulll != startArgs) pi.Arguments = startArgs.ToString(); Process p = new Process(); p.StartInfo = pi; p.Start(); StreamWriter w = p.StandardInput; w.AutoFlush = true; for (int i = 0x0; i < input.Length; i ++) w.WriteLine(input ); w.Close(); p.Close(); p.Dispose(); }
J Justin Oct 13, 2004 #3 Nevermind, write after I posted I found it. System.Diagnostics.Process.Start(...);