简体   繁体   中英

How to set installation status for wix msi to command prompt

I am using 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.

CMD does not hold to wait to complete the installation OR does not show the status of installation.

My question is that How to hold the CMD while installation is in progress? How to show installation status to CMD for wix installer?

Edit: I have tried start /wait msiexec.exe /i installer.msi PASSWORD="pass" /QN /L*V "msilog.log" . It holds the cmd screen until installation process completed. Its fine now.

2nd question, I tried to get the status of the installation after the above command. " 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.

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:

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.


Links:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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