using the process class

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rigamonk

    using the process class

    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


  • rigamonk

    #2
    Re: using the process class

    nevermind...got it

    "rigamonk" <rigNOamonk@hot SPAMmail.com> wrote in message
    news:LO2dnVLE8s Qk9gzcRVn-3A@giganews.com ...[color=blue]
    > 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
    >[/color]


    Comment

    Working...