Invoking other applications

  • Thread starter Thread starter Justin
  • Start date Start date
J

Justin

How do you invoke other applications with or without command line
arguments?
 
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();
}
 
Nevermind, write after I posted I found it.
System.Diagnostics.Process.Start(...);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top