5 Ağustos 2007 Pazar

Capture Output from a Console Application

' ----------------------------------------
' Required Imports :
'
' System
' System.Diagnostics
' Microsoft.VisualBasic
' ----------------------------------------

Dim consoleApp As New Process
With consoleApp
.StartInfo.UseShellExecute = False
.StartInfo.RedirectStandardOutput = True
.StartInfo.FileName = "ConsoleApplication.exe"
.Start()
.WaitForExit()
End With

Dim output As String = consoleApp.StandardOutput.ReadToEnd()


0 Comments: