Im trying to start another application from within my vb.net program using
the process class. i want to start it, capture the stdout and stderr and
print them to a textbox.
I get something when i run ipconfig, but nothing when i run the command to
start nasm.
heres what it looks like:
Dim myProcessStartI nfo As New ProcessStartInf o("nasm.exe") 'this is
the correct command
myProcessStartI nfo.Arguments = "-h" 'just
want to print out the help
myProcessStartI nfo.UseShellExe cute = False
myProcessStartI nfo.RedirectSta ndardOutput = True
myProcess.Start Info = myProcessStartI nfo
myProcess.Start ()
TextBox1.Text = myProcess.Stand ardOutput.ReadT oEnd
like i said, if i run ipconfig, it works great...but anything else produces
nothing.
I've stepped through it, and im getting an empty string... bu t when i do
the same thing in the command window, im getting the correct info.
i have tried it with redirecting stderr, with the same result.
any ideas?
thanks
patrick
the process class. i want to start it, capture the stdout and stderr and
print them to a textbox.
I get something when i run ipconfig, but nothing when i run the command to
start nasm.
heres what it looks like:
Dim myProcessStartI nfo As New ProcessStartInf o("nasm.exe") 'this is
the correct command
myProcessStartI nfo.Arguments = "-h" 'just
want to print out the help
myProcessStartI nfo.UseShellExe cute = False
myProcessStartI nfo.RedirectSta ndardOutput = True
myProcess.Start Info = myProcessStartI nfo
myProcess.Start ()
TextBox1.Text = myProcess.Stand ardOutput.ReadT oEnd
like i said, if i run ipconfig, it works great...but anything else produces
nothing.
I've stepped through it, and im getting an empty string... bu t when i do
the same thing in the command window, im getting the correct info.
i have tried it with redirecting stderr, with the same result.
any ideas?
thanks
patrick
Comment