简体   繁体   中英

How to report msi installation status on quiet install

I'm trying to do a quiet install using a Wix created msi. The thing is that there is absolutely no reporting on how the install has gone, ie whether it's succeeded or not.

At the moment, I'm logging everything to a file and checking the file afterwards, I'm just wondering whether there is a better way?

TIA

When you run an msi silently, msiexec will have an exit code. 0 and 3010 is 'good' (3010 means reboot needed ) everything else ( especially 1603 ) is bad.

List of error codes and error messages for Windows Installer processes

I would say this is what quiet install is all about - install quietly. :) You might want to examine other command line switches starting from /q . This is the excerpt from the article about msiexec.exe :

/qn : Displays no user interface.

/qb : Displays a basic user interface.

/qr : Displays a reduced user interface with a modal dialog box displayed at the end of the installation.

/qf : Displays the full user interface with a modal dialog box displayed at the end.

/qn+ : Displays no user interface, except for a modal dialog box displayed at the end.

/qb+ : Displays a basic user interface with a modal dialog box displayed at the end.

/qb- : Displays a basic user interface with no modal dialog boxes.

If you only need to make sure it's there after the installation yourself, take a look at the add/remove programs console. If it's been installed, it is there (unless you tell it explicitly not to be ).

You have gotten the right answer in terms of the exit codes, but I just want to add that another way to allow more "interactivity" whilst still suppressing most of the MSI GUI is to allow a modal dialog to be displayed at the end of the install. This is achieved by adding /QN+ to the msiexec.exe command line:

C:\Windows\system32\msiexec.exe /I "C:\test.msi" /QN+

This will make the install run silently, but a modal dialog will be show at the end of the setup telling you that the install completed.

There are many options with regards to suppressing parts of the GUI sequence, and the command lines to achieve this are sometimes confusing. Please check my post here for a tool that can help to demystify the command line syntax by auto generating it with a simple, free tool .

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