Results 1 to 4 of 4

Thread: Run another EXE and wait for termination

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2009
    Posts
    20

    Run another EXE and wait for termination

    Could anyone provide help with running an EXE (for example a command line utility) and wait for termination? I was also thinking of using the Shell command and "Start /wait filename.exe" however will this work? If not, could someone provide a simple "alternative" in vb. Thanks in advance.

  2. #2
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: Run another EXE and wait for termination

    i remember i found a thred in vbf which discribe how to shellexecute and get the app's process id. let me check it. so if it posible, you can keep watching weather the process is running and take a decision when that app terminated.

  3. #3
    Addicted Member
    Join Date
    May 2007
    Location
    Belgium
    Posts
    156

    Re: Run another EXE and wait for termination

    Well, this is 1 way:
    Code:
    Shell "winmine"
    Do while findWindow(vbnullstring,"Minesweeper") = true
    loop
    msgbox "Window not found anymore."

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Mar 2009
    Posts
    20

    Re: Run another EXE and wait for termination

    Will this method work on command line utilities?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width