简体   繁体   English

如何将 wix msi 的安装状态设置为命令提示符

[英]How to set installation status for wix msi to command prompt

I am using wix installer.msi.我正在使用 wix installer.msi。 When i run it quitly with command " msiexec.exe /i Installer.msi /QN /L V "msilog.log"*", it install and creates a log file.当我使用命令“ msiexec.exe /i Installer.msi /QN /L V "msilog.log"*” 运行它时,它会安装并创建一个日志文件。

CMD does not hold to wait to complete the installation OR does not show the status of installation. CMD 不等待完成安装或不显示安装状态。

My question is that How to hold the CMD while installation is in progress?我的问题是如何在安装过程中握住 CMD? How to show installation status to CMD for wix installer?如何为 wix 安装程序向 CMD 显示安装状态?

Edit: I have tried start /wait msiexec.exe /i installer.msi PASSWORD="pass" /QN /L*V "msilog.log" .编辑:我试过start /wait msiexec.exe /i installer.msi PASSWORD="pass" /QN /L*V "msilog.log" It holds the cmd screen until installation process completed.它保持 cmd 屏幕,直到安装过程完成。 Its fine now.现在很好。

2nd question, I tried to get the status of the installation after the above command.第二个问题,我尝试在上述命令之后获取安装状态。 " NET HELPMSG %errorLevel% ". NET HELPMSG %errorLevel% ”。 It gives the correct status if executed as separate commend.如果作为单独的命令执行,它会给出正确的状态。

When excecuted as combined like start /wait msiexec.exe /i installer.msi PASSWORD="pass" /QN /L V "msilog.log" & NET HELPMSG %errorLevel% *, its always return 0-Successfully installed even in case of error.当像start /wait msiexec.exe /i installer.msi PASSWORD="pass" /QN /L V "msilog.log" & NET HELPMSG %errorLevel% * 组合执行时,它总是返回 0-Successfully installed 即使在以下情况下错误。

Please suggest?请建议?

As Heath Stewart of Microsoft (Senior Engineer) explains here: Waiting for msiexec.exe to Finish - you can try the start wait construct exemplified as follows:正如 Microsoft 的Heath Stewart (高级工程师)在这里解释的那样: 等待 msiexec.exe 完成- 您可以尝试启动等待构造,示例如下:

start /wait msiexec.exe /i Installer.msi /QN /LV "msilog.log"

Do visit the above link for technical details.请访问上述链接了解技术详情。 Essentially Widows Installer always returns to the console immediately unless you specifying for it to wait using the above construct.本质上,Widows 安装程序总是立即返回到控制台,除非您使用上述构造指定它等待。


Links:链接:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM