静默安装后,使用Installshield中的命令行运行应用程序 [英] Run application after silent install using command line in Installshield
问题描述
我使用Visual Studio 2015的Install-shield Limited为我的项目创建了setup.exe. 我可以使用以下命令行静默运行它:
I created a setup.exe for my project using Install-shield Limited for visual studio 2015. I was able to run it silently with this command line:
Setup.exe /s /v/qb
工作正常.现在,我想在完成安装后运行已安装的应用程序.我该怎么办?
It works fine. Now I want to run the installed application after completing the installation. How can I do it?
(我更喜欢在上面的命令行中添加一些内容来实现这一点.)
(I prefer to add something to the above command-line to do this).
还有另一个问题,例如我的问题.这个问题也想在安装后运行应用程序.但是我的问题是在静默安装(使用命令行)之后运行,另一个问题是在用户正常安装之后运行.我之前曾尝试过该问题的答案,但在我的情况下它们不起作用.
There is another question like mine. That question wants to run application after installation too. but my question is to run after silent installation (using command-line) and the other question is to run after a normal installation by user. I tried the answers of that question before and they don't work in my case.
推荐答案
谢谢@ Michael-Urman我找到了答案:
Thank you to @Michael-Urman I found the answer:
我应该使用批处理命令执行.您可以使用&
符号(或&&
)执行多个命令.
I should use the batch command executing. You can execute more than one command by using &
symbol (or &&
).
但是我需要先完全运行安装程序,然后运行程序.所以我用了start /wait
命令.
But I need to run setup first completely then run the program. So I used start /wait
command.
最后的命令是这样:
start /wait setup.exe /w /s /v/qb && "C:\Program Files (x86)\Company\Product\program.exe"
/wait
暂停cmd
,直到安装完成,然后运行下一个命令.
/wait
suspends cmd
until setup finishes then runs next command.
/w
使setup.exe
保持活动状态,直到成功安装msi
软件包为止.
/w
keeps setup.exe
alive until msi
package installs successfully.
/s
静默安装程序,并且/v
将参数传递给msi
安装程序(请参见
/s
installs the program silently and /v
passes arguments to msi
installer (see documentation).
/qb
显示了msi安装程序的基本UI. (请参见文档)
/qb
shows basic UI of msi installer. (see documentation).
&&
(与&
相比)将运行第二个命令.
&&
(in comparison with &
) runs 2nd command if 1st command runs successfully.
这篇关于静默安装后,使用Installshield中的命令行运行应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!