System.Diagnostics.Process to run processes, send parameters and get output
Posted
by Lily
on Stack Overflow
See other posts from Stack Overflow
or by Lily
Published on 2010-04-14T19:08:10Z
Indexed on
2010/04/14
19:13 UTC
Read the original article
Hit count: 364
Hi,
I am trying to call a process using System.Diagnostics.Process, send it a parameter, just for the sake of trying it out i am sending "-h" which should generate a list of help options and I need the output.
So far I have tried,
ProcessStartInfo startInfo = new ProcessStartInfo("C:\\agfl\\agfl.exe");
startInfo.WindowStyle = ProcessWindowStyle.Normal;
startInfo.CreateNoWindow = false;
startInfo.Arguments = "-h";
Process.Start(startInfo);
Any help please?
Thanks :)
© Stack Overflow or respective owner