Jump to content

Recommended Posts

Posted

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!


Posted

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.

Posted (edited)

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
Posted

And what if your not using a title of the dos box?, which i'm not.

Having looked at the start /? your correct in that it should be

/start "tilte" /wait <command to run>

Posted

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"

Posted

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.

Posted (edited)

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
Posted

durex, your right was sa typo that put the / in front of start.

Did you manage to get this working? as i've plugged away and so far no luck.

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...