Instead of doing it that way call Process.BeginOutputReadLine and then create an event handler for the OutputDataReceived event.