Process Class question

meerkat

Newcomer
Joined
Nov 11, 2003
Messages
2
Location
San Diego, CA, USA
I'm using the Process class in VB.NET to launch a command line app. The app returns messages to the standard output and the standard error, which I have redirected to streams. The problem is that I want to display the output in the order it happened. For instance the app that I am running will write a line to the error and then some lines to the standard, then another line to the error and some more line to the standard. Is there a way that I can catch the line as it's written to the stream and display it? Thanks in advance.
 
Thanks for the reply, but my problem is a bit different. Basically, what I want to do is send the error output and the standard output to the same textstream. The process that I execute sends output to the error and standard outputs. If I redirect the outputs to their own streams and wait for the process to exit, I won't be able to display output in the order that they would have been displayed on screen in a command window.

Is it possible to redirect both outputs to the same stream?

If not, could I read from the outputs individually as they are populated (while the process is running) into another string?
 
Back
Top