3

I have WiX project to create a MSI package. I want to set UI level to 3 or 4 or 5 so that it can show success/failure after the setup. Currently it just run and vanishes. Is there a way to set UI level on the package?

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
Neel
  • 31
  • 1

1 Answers1

0

Samples: WiX Quick Start Samples.


Setup GUI: It sounds like your MSI does not have a built-in GUI at all? If so, try setting a reference to WixUIExtension.dll and define a standard WiX dialog set to use for your package - for example WixUI_Mondo. This will give your setup a sequence of "default dialogs" that are pre-made for you to apply with ease.

Procedure for Visual Studio (go here for click-by-click version):

  1. In your WiX Visual Studio solution, open up the project list, right click "References" and click "Add Reference...". Now set a reference to: C:\Program Files (x86)\WiX Toolset v3.11\bin\WixUIExtension.dll (or whatever location this file is at on your box)

  2. The file you referenced contains default GUI-sets. Now you can just inject this line into your WiX source file to have default MSI dialogs show up:

    <UIRef Id="WixUI_Mondo" />
    

Here is a quick sample project that you can try to see this in action: https://github.com/glytzhkof/WiXDefaultDialogsSample (direct link to line in source)


UILEVEL: UILEVEL is a property setting you can use during actual installation of the MSI on end user's box (not during compilation of the source into an MSI file). The property allows you to control how much of the setup's internal GUI is visible for the end user (if there is an embedded GUI at all). You can show all dialogs, a reduced set, basic / minimal dialogs or no dialogs at all (proper silent mode).

The actual built-in MSI GUI is added during compilation as described above. UILevel does not add any GUI to an MSI without one defined internally. However, even a setup with no internal GUI defined can show a modal dialog at the end if you use this command line:

msiexec.exe /i MySetup.msi /qb+

You can also use /qn+ for "no UI, but modal completion dialog". The above is "basic UI with modal completion dialog". Msiexec.exe reference from Advanced Installer and here is the same from Microsoft Docs and from InstallShield.

Here is a dialog from an old tool to generate msiexec.exe command lines. Here you can see the different settings for UILevels:

Msiexec.exe


Links:

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164