Jump to content

Does start /wait work?


Recommended Posts

Does anyone know if 'start /wait' command works in WPI?

I havent tested it, but thought Id check to see if anyone else is using it without issue..

For example:

start /wait "Title" C:\whatever.cmd

Which of course will keep anything else from executing until the 'whatever.cmd' completes.

Thanks!

Link to comment
Share on other sites


i've tried this and it doesn't work

The command i use is this

%windir%\\system32\\cmd /c start /wait %CDROM%\\Apps\\activesync\\setup.exe /s

You need to call cmd as otherwise start doesn't isn't called, the /c, is so the the dos box terminates on end

i've found the other apps in order after it are just run.

Link to comment
Share on other sites

Put the "Title In Quotes" before the /wait statement, not after it.

Looks like you're quote refences a line from a registry file (judging from the double backslashes "\\"). Try loading up the registry file and looking at the results in regedit directly. Make sure it ends up the way you expect. I.e.:

%windir%\system32\cmd /c start "ActiveSync Install" /wait "%CDROM%\Apps\activesync\setup.exe" /s

Edited by Nois3
Link to comment
Share on other sites

not sure if it was just a typo or not, but you want to make sure you take off the leading slash. also, from what Ive gathered, because its a shell command you need to call it though that...

cmd /c start "" /wait "command to run"

Link to comment
Share on other sites

No.

It's simply because the start command expects the first set of quotes to define the title. It doesn't change the title of the command prompt, in fact I don't know what it does.

What I do know is that if you don't use it this way you'll run into problems. Especially if your first set of quotes is used to specify the program name and you need to use quotes in that programs command line.

Link to comment
Share on other sites

Actually, a title isnt necessarily required. The only time its required is when you use quotes for your program/command, of which you only need to use if there are spaces in either the program name or path. So when you do use quotes, the start command expects the 1st set of quotes to be the title and the second set of quotes for the command to run. Lastly, you dont need to actually need to put in a title description, using 2 double quotes will also suffice.

So.. the following all work.

start /wait c:\blah.cmd
start /wait "this is my title" c:\blah.cmd
start /wait "title title" "c:\blah.cmd"
start /wait "" c:\blah.cmd

You get the point....

Oh 2 other things... the title does in fact set the title bar of the command prompt window the command is running in; its the only function it serves and it doesnt matter if you place it before or after the '/wait' parameter.

Edited by durex
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...