c00000fd
c00000fd

Reputation: 22255

How to check if it's a silent installation from the custom action DLL?

When my installer is started with msiexec /q /i command line, is there a way to tell that it's a silent installation from my custom action C++ DLL?

PS. I'm using WiX to build my MSI.

Upvotes: 1

Views: 483

Answers (1)

Stein Åsmul
Stein Åsmul

Reputation: 42126

The UILevel property of Windows Installer will tell you whether the setup has been launched silently. Four different UI levels are possible:

  • INSTALLUILEVEL_NONE - 2 - switch: /qn - Completely silent installation.
  • INSTALLUILEVEL_BASIC - 3 - switch: /qb - Simple progress and error handling.
  • INSTALLUILEVEL_REDUCED - 4 - switch: /qr - Authored UI, wizard dialogs suppressed.
  • INSTALLUILEVEL_FULL - 5 - Authored UI with wizards, progress, errors (/qf).

UILevel may be better used to condition a whole custom action to run or not run depending on what the UILevel is set to? Or you can get its value inside the custom action and change behavior accordingly.

Essential Links:

Further Links:


UPDATE: From the old Wise Command Line Builder tool, here are some options for the MSI GUI. Note the use of plus and minus to show or hide completion screen for silent install:

Wise Command Line Builder

Upvotes: 2

Related Questions