
To do this, we’ll add another Installer File to our project and call it UserRegDialog.wxs. In this example, we would like the user to enter his name and e-mail address as part of the setup experience. You have to set the Bitmap attribute to Yes and set the Text attribute equal to the Id of the property that contains a reference to the Binary element, which in turn contains a reference to the image to use for the button e.g.: installbtn The install button is referenced in markup in the following manner: To specify which font to use for a Text control, add the TextStyle property to the controls’ Text attribute as illustrated below: The following control uses the Binary element we’ve included in the Product.wxs file to set a white background for our dialog: The Dialog element contains a number of Control elements which make up the dialog UI. The Height and Width attributes are required and are used to set the size of the dialog. The Dialog element is used to “build” your UI. Next, we specify the fonts that our custom dialog will use by adding two TextStyle elements. We’ll use this image for a button that the user will have to click to start the installation process. Next, we have a Binary element that contains a reference to an image file in our setup project:

You’ll notice that we set the UI element’s Id attribute to SetupDialogUI this is the value we’ve specified in the UIRef Element of the Product.wxs file. This file will be used to create the first dialog in the setup process.Ĭhange the SetupDialog.wxs Installer file’s mark-up to the following: installbtn Next, we need to add a new WiX Installer File to the project. Notice, the UIRef, Binary, Property and Custom Action elements. The download package (see below) is updated to include this fix. Update The lines commented out in the listing below produced this issue: the custom action was executed for the second time with no parameters passed to it. Change the mark-up in the file to the following: For now we’ll only add a Feature element and a Fragment element that contains the product components. The project wizard will create the initial Product.wxs WiX source file. Start by creating a new WiX Setup project in Visual Studio: We’ll assume we already have an application for which we need an installer and only focus on creating the setup project. Lastly, we’ll show a dialog to indicate the progress of the installation: When the user clicks on the “Install Now” button, they will be prompted to enter their full name and email address. Our installation will start with an introduction dialog: In this article, we’ll build a custom WiX setup project that will use the modern/metro style look and feel.

If, however, you need more flexibility when it comes to your MSI installer’s user interface, WiX provides the ability to build a custom UI of your setup project.

The WiX toolset provides a number of built-in dialogs that should be adequate for most installers.
