Create Setup GUI

By default a setup built with the WiX Toolset doesn’t provide a GUI. This might be sufficient for an administrator, but for users it is quite annoying and confusing. In this tutorial we’ll cover, how you can simply add a GUI to your setup.

wix_wpf_application_setupgui
(Setup-image has been resized)

Built-in WiX Dialogs

The WiX Toolset comes with multiple predefined dialog-sets, which you can simply take and use. For most usecases they are sufficient. If the built in dialogs do not fit your needs, you’d even have the possibility to customize them.

WixUI_Minimal
  • Welcome Dialog
  • License Dialog
  • Installation Finished Dialog
WixUI_InstallDir
  • Welcome Dialog
  • License Dialog
  • Disk-Cost/Installation Directory Dialog
  • Installation Finished Dialog
WixUI_FeatureTree
  • Welcome Dialog
  • License Dialog
  • Feature Selection Dialog
  • Installation Finished Dialog
WixUI_Advanced
  • Allows the user to choose between minimal- and advanced installation. If advanced is chosen, then the directory and features can be selected.
WixUI_Mondo
  • Allows the user to choose between minimal-, custom- and advanced installation.

Step by step guide

As an example, we’ll add a GUI to our setup, which allows the user to select an installation-directory.

  1. Add a reference to the WIXUIExtension.dll
    wix_wpf_application_wixuireference

  2. Add the ui-namespace to the Wix-Element
    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" 
         xmlns:ui="http://schemas.microsoft.com/wix/UIExtension">
    	...
    </Wix>
    
  3. Within the product-element after the package, add the installationdirectory and the GUI-type to the setup-xml
    <Wix ...>
    	<Product ...>
    		<Package ... />
    
    		<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
    		<UIRef Id="WixUI_InstallDir" />
    		...
    	</Product>
    </Wix>
    

That’s all. You can now build and try it! Congratulations, you have built your first setup with a GUI!

In the next tutorial we’ll learn how to add a startmenu to a WiX Toolset setup!