"START /W" with additional switches

5

I am trying to run a silent install of several exe's via a batch file, however need them to run one by one instead of simultaneously. It seems like "START /W" wont work when switches not native to it are used, for example:

START /WAIT "%userprofile%\desktop\jre-8u25-windows-i586.exe" /s

return's the following error: invalid switch "/s"

Any help will be appreciated

David

Posted 2014-11-20T20:53:13.867

Reputation: 87

Answers

10

start has a weird syntax where the first string in quotes is the new (console) window title. Your command is quoted, so start interprets it as the title, and doesn't know what /s is.

So, add a dummy title, like this:

START /WAIT "" "%userprofile%\desktop\jre-8u25-windows-i586.exe" /s

Jonathan

Posted 2014-11-20T20:53:13.867

Reputation: 2 294

Answered in no time flat. Thank you Jonathan, it worked – David – 2014-11-20T21:07:33.093