How to report msi installation status on quiet ins

2019-08-09 02:56发布

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, i.e. 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

3条回答
一夜七次
2楼-- · 2019-08-09 03:20

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

查看更多
3楼-- · 2019-08-09 03:31

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.

查看更多
闹够了就滚
4楼-- · 2019-08-09 03:43

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).

查看更多
登录 后发表回答