Jump to content

Recommended Posts

Posted

Here's an example GUI application that won't wait, no matter if it's on the command line or in a script:

at the command prompt:

> start "" /wait "c:/Program Files/Mozilla Firefox/firefox.exe"

=> DOESN'T WAIT

in a .cmd file:

start "" "c:/Program Files/Mozilla Firefox/firefox.exe"

or

start "" /wait "c:/Program Files/Mozilla Firefox/firefox.exe"

=> DOESN'T WAIT

i think it's a function of how the application is programmed to exit.


Posted (edited)

You could try this:

START "" /WAIT "C:/Program Files/Mozilla Firefox/firefox.exe"

:CHECK

ping -n 10 localhost 1> NUL

TASKLIST /v /fi "IMAGENAME eq firefox.exe" 2>&1 > NUL

IF ERRORLEVEL 1 GOTO CHECK

Edited by Outbreaker

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...