Jump to content

About cmd's 'start "" /wait' command


Recommended Posts

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.

Link to comment
Share on other sites


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
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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