1

I am using wix installer .msi. When i run it quitly with command "msiexec.exe /i Installer.msi /QN /LV "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 /LV "msilog.log" & NET HELPMSG %errorLevel%* , its always return 0-Successfully installed even in case of error.

Please suggest?

1 Answers1

0

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:

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • Adding this /wait , holds the cmd. Any idea of showing status that whether installation failed or pass with wix installer ? –  Jul 30 '20 at 13:20
  • Will get back later to look, you have `echo %errorlevel%` that you can try after running a command, but I read Raymond Chen's blog on that - and there was an issue with this - https://ss64.com/nt/errorlevel.html - Also: are you in a batch file or just pushing command lines? One of Chen's blog (that I don't have the time to re-read right now: https://devblogs.microsoft.com/oldnewthing/?p=20743). – Stein Åsmul Jul 30 '20 at 13:54
  • i m using wix package which combines 2 msi. It install 2 services. command i uses as "start /wait Installer.Package -q PASSWORD="pass" –  Jul 30 '20 at 14:06
  • Are you in a Burn bundle?? – Stein Åsmul Jul 31 '20 at 13:24
  • Yes. using wix bootstrapper bundle with 2 msi. –  Aug 01 '20 at 13:10