consolewixwindows-installer

MSI launched with /q (silent) - is it possible to print a message to the console?


I have an MSI installer (built with WiX), and some users run it in silent mode, for example:

msiexec /i MyApp.msi /q

If the user starts the MSI like this without passing certain required properties (e.g., ACCEPT_EULA=1), I would like to print a message directly to the console, something like:

You must accept the EULA by passing ACCEPT_EULA=1

Can an MSI running in silent mode (/q) write anything to STDOUT or STDERR at all? From a Custom Action or otherwise?

Thanks!


Solution

  • Not with an MSI. The MSIEXEC process will not allow this UI element through. The best that you can do is to write a string to the log with the same information.