Im trying to capture the stdout from running a process from within my app.
I've been dinking around using the code straight off the MS site. i can get
"ipconfig / all" (for example) to send back its output, but not (in this
case) "nasm -v" , which displays version information.
whats happening?
slightly modified MS code:
Dim myProcessStartInfo As New ProcessStartInfo("c:\nasm\nasm", "-v")
myProcessStartInfo.UseShellExecute = False
myProcessStartInfo.RedirectStandardOutput = True
myProcess.StartInfo = myProcessStartInfo
myProcessStartInfo.CreateNoWindow = True
myProcess.Start()
Dim myStreamReader As StreamReader = myProcess.StandardOutput
' Read the standard output of the spawned process.
Dim myString As String = myStreamReader.ReadToEnd
txtOutput.Text = myString
thanks,
patrick