How to start a .exe program from a VB2008 program ?

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

    How to start a .exe program from a VB2008 program ?

    Hello,

    I would like to know how I can start a .EXE program from a VB2008 program,
    in the same thread (= like a subroutine). That means that my VB program
    waits for the .exe program to finish. How can I look at its return code ?

    Thank you in advance,
    Gilbert


  • rowe_newsgroups

    #2
    Re: How to start a .exe program from a VB2008 program ?

    On Oct 3, 3:56 am, "Gilbert Tordeur" <gilbert.tord.. .@orange.fr>
    wrote:
    Hello,
    >
    I would like to know how I can start a .EXE program from a VB2008 program,
    in the same thread (= like a subroutine). That means that my VB program
    waits for the .exe program to finish. How can I look at its return code ?
    >
    Thank you in advance,
    Gilbert
    While I don't believe it can live as the same thread, you can easily
    start an exe and wait for it to exit:

    ///////////////
    Imports System.Diagnost ics

    Dim p As Process = Process.Start(. ..)
    p.WaitForExit()
    ///////////////

    Or something like that :-)

    Thanks,

    Seth Rowe [MVP]

    Comment

    • Cor Ligthert[MVP]

      #3
      Re: How to start a .exe program from a VB2008 program ?

      Gilbert,



      Here some possibilities

      Cor

      "Gilbert Tordeur" <gilbert.tordeu r@orange.frschr eef in bericht
      news:epvOj2SJJH A.4280@TK2MSFTN GP04.phx.gbl...
      Hello,
      >
      I would like to know how I can start a .EXE program from a VB2008 program,
      in the same thread (= like a subroutine). That means that my VB program
      waits for the .exe program to finish. How can I look at its return code ?
      >
      Thank you in advance,
      Gilbert
      >

      Comment

      Working...