I use this in an app where the streams are written to a textbox using a delegate...
Public Shared Function launch_hProccess(ByVal myfile As String, Optional ByVal Args As String = Nothing, Optional ByVal wait As Boolean = True, Optional ByVal background As Boolean = True) As Integer
Try
cmd_Process = New Process 'new object
With cmd_Process.StartInfo
.FileName = myfile
.Arguments = Args
.CreateNoWindow = True
.UseShellExecute = False
.ErrorDialog = False
.RedirectStandardOutput = True
.RedirectStandardError = True
End With
cmd_Process.Start()
launch_hProccess = cmd_Process.Id
cmd_OutputThread = New Thread(AddressOf cmd_so)
cmd_OutputThread.IsBackground = background 'default=true
cmd_OutputThread.Start()
cmd_ErrorThread = New Thread(AddressOf cmd_eso)
cmd_ErrorThread.IsBackground = background 'default=true
cmd_ErrorThread.Start()
If wait Then cmd_Process.WaitForExit()
Catch ex As Exception
log_write(ex.Message & " in launch_hProcess...", txtC.status)
End Try
End Function