Jason,
I'm assuming that the executable is a console application. In order to
get the output from the standard output stream, you have to set the
RedirectStandardOutput (or RedirectStandardError if you are reading from
that stream) to true on the ProcessStartInfo instance associated with the
Process.
Then, once you run your process, you can access the StreamReader
instances exposed by the StandardOutput and StandardError properties and
read the output that is printed to the console.
Make sure that the UseShellExecute property is set to false on the
ProcessStartInfo instance you use to initialize the Process instance. If
you do not set it to false, then you will not be able to read from these
streams (an exception will be thrown).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Jason" <wh*@microsoft.comwrote in message
news:eW**************@TK2MSFTNGP02.phx.gbl...
Hello
I've got a Excutable that returns a number of string based upon the number
arguments given to it. I'm using C# to run that exactuable with the
process.start method and in this case 4 argument.... now my question is
that how do I get the returned strings ?