我正在尝试通过命令
通过批处理脚本构建一个installshield安装程序START /wait "C:\Program Files (x86)\InstallShield\2012Spring\System\IsCmdBld.exe" -p "installer path.ism" -r Release > ".txt to hold output"
当我使用CALL而不是START / wait
时,它工作正常当我使用START /等待时,我收到错误消息“Windows无法找到'-p'。请确保您输入的名称正确,然后重试”
我有时会使用相同的批处理脚本构建多个安装程序,所以我希望它等待在启动下一个之前完成构建一个,这就是我尝试使用START / wait的原因
答案 0 :(得分:0)
START "" /wait "C:\Program Files (x86)\InstallShield\2012Spring\System\IsCmdBld.exe" -p "installer path.ism" -r Release > ".txt to hold output"
根据START
文档:Start a program, command or batch script (opens in a new window.)
Syntax START "title" [/D path] [options] "command" [parameters] Key: title Text for the CMD window title bar (required.) path Starting directory. command The command, batch file or executable program to run. parameters The parameters passed to the command.
始终包含一个标题,这可以是一个简单的字符串,如“我的脚本”或 只是一对空引号“”。根据微软的说法 文档,标题是可选的,但取决于另一个 选择的选项如果省略则可能会出现问题。
答案 1 :(得分:0)
走简单的路线,只需在批处理文件中列出连续的iscmdbld命令:
set ISCMDBLD="C:\Program Files (x86)\InstallShield\2012Spring\System\IsCmdBld.exe"
%ISCMDBLD% -p "installer1 path.ism" -r Release1 > ".txt1 to hold output"
%ISCMDBLD% -p "installer2 path.ism" -r Release2 > ".txt2 to hold output"
...
由于iscmdbld是一个控制台应用程序,批处理文件中的标准行为应该是阻止它直到应用程序退出。通常start /wait
仅适用于gui应用程序。