Pieter van der Westhuizen

How to add custom dialogs in WiX installers

The WiX toolset provides a number of built-in dialogs that should be adequate for most installers. 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.

In this article, we’ll build a custom WiX setup project that will use the modern/metro style look and feel.

Our installation will start with an introduction dialog:

When the user clicks on the “Install Now” button, they will be prompted to enter their full name and email address.

Lastly, we’ll show a dialog to indicate the progress of the installation:

The WiX setup project

We’ll assume we already have an application for which we need an installer and only focus on creating the setup project. Start by creating a new WiX Setup project in Visual Studio:

The project wizard will create the initial Product.wxs WiX source file. For now we’ll only add a Feature element and a Fragment element that contains the product components. Change the mark-up in the file to the following:

Update 1-Jul-2020 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. The download package (see below) is updated to include this fix.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="*" Name="Win App" Language="1033" Version="1.0.0.0" Manufacturer="Silly Software Inc." UpgradeCode="5b0d1312-348e-492c-9447-de720c151cd8">
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
 
    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate EmbedCab="yes" />
 
    <Feature Id="ProductFeature" Title="WinAppSetup" Level="1">
      <ComponentGroupRef Id="ProductComponents" />
    </Feature>
 
    <UIRef Id="SetupDialogUI" />
 
    <Binary Id="bgPic" SourceFile="images/bg.bmp"/>
    <Binary Id="cancelbtn" SourceFile="images/cancelbtn.bmp"/>
    <Property Id="Cancel">cancelbtn</Property>
 
<!--    <InstallExecuteSequence>
      <Custom Action='RegistrationInfoCustomAction' Before='InstallFinalize'>NOT Installed</Custom>
    </InstallExecuteSequence> -->
 
  </Product>
 
  <Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="INSTALLFOLDER" Name="WinApp" />
      </Directory>
    </Directory>
  </Fragment>
 
  <Fragment>
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
      <Component Id="Executable" Guid="3252A379-9249-4DB4-9F7F-C6A10F68F88A">
        <File Id="WinAppExe" Name="WinApp.exe" Source="..WinAppbinDebugWinapp.exe" Vital="yes" />
        <RemoveFolder Id="INSTALLDIR" On="uninstall" />
      </Component>
      <Component Id="Documentation" Guid="A70DAF37-0EAC-49BD-A8B0-2C5D8AF81085">
        <File Id="ReadMeTxt" Name="ReadMe.txt" Source="..WinAppbinDebugReadMe.txt" Vital="yes" />
      </Component>
    </ComponentGroup>
  </Fragment>
 
</Wix>

Notice, the UIRef, Binary, Property and Custom Action elements.

Creating the first setup dialog

Next, we need to add a new WiX Installer File to the project. This file will be used to create the first dialog in the setup process.

Change the SetupDialog.wxs Installer file’s mark-up to the following:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Fragment>
    <UI Id="SetupDialogUI">
 
      <Property Id="Install">installbtn</Property>
      <Binary Id="installbtn" SourceFile="images/installbtn.bmp"/>
 
      <DialogRef Id="ProgressDialog"/>
 
      <TextStyle Id="TahomaHeader" FaceName="Tahoma" Size="18" Bold="yes" />
      <TextStyle Id="TahomaNormal" FaceName="Tahoma" Size="8" />
      <Property Id="DefaultUIFont" Value="TahomaNormal" />
 
      <Dialog Id="SetupDialog" Width="400" Height="300" Title="Silly Software">
 
        <Control Id="background" Type="Bitmap" Text="bgPic" Height="300" Width="400" X="0" Y="0" TabSkip="no" />
 
        <Control Id="introText"  Type="Text" X="75" Y="50" Width="350" Height="22" Transparent="yes" Text="{TahomaHeader}Welcome to Metro App setup." />
        <Control Id="explanationText" X="85" Y="100" NoWrap="no" RightAligned="no" Transparent="yes" Type="Text" Width="250" Height="100" Text="{TahomaNormal}To continue with the setup click on the Install button. If you choose not to install this application, click on the Cancel button to exit." />
 
        <Control Id="installButton" Type="PushButton" Text="[Install]" Height="62" Width="222" X="90" Y="180" Bitmap="yes">
          <Publish Event="EndDialog" Value="Return" />
        </Control>
 
        <Control Id="cancelButton" Type="PushButton" Text="[Cancel]" Height="40" Width="144" X="135" Y="245" Cancel="yes" Bitmap="yes">
          <Publish Event="EndDialog" Value="Exit" />
        </Control>
 
      </Dialog>
 
    </UI>
 
    <InstallUISequence>
      <Show Dialog="SetupDialog" Before="ExecuteAction" />
    </InstallUISequence>
  </Fragment>
</Wix>

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. Next, we have a Binary element that contains a reference to an image file in our setup project:

We’ll use this image for a button that the user will have to click to start the installation process. Next, we specify the fonts that our custom dialog will use by adding two TextStyle elements. The Dialog element is used to “build” your UI. The Height and Width attributes are required and are used to set the size of the dialog.

The Dialog element contains a number of Control elements which make up the dialog UI. The following control uses the Binary element we’ve included in the Product.wxs file to set a white background for our dialog:

<Control Id="background" Type="Bitmap" Text="bgPic" Height="300" Width="400" X="0" Y="0" TabSkip="no" />

To specify which font to use for a Text control, add the TextStyle property to the controls’ Text attribute as illustrated below:

<Control Id="introText"  Type="Text" X="75" Y="50" Width="350" Height="22" Transparent="yes" Text="{TahomaHeader}Welcome to Metro App setup." />

The install button is referenced in markup in the following manner:

<Control Id="installButton" Type="PushButton" Text="[Install]" Height="62" Width="222" X="90" Y="180" Bitmap="yes">
  <Publish Event="EndDialog" Value="Return" />
</Control>

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.:

<Property Id="Install">installbtn</Property>
<Binary Id="installbtn" SourceFile="images/installbtn.bmp"/>

Gathering user information

In this example, we would like the user to enter his name and e-mail address as part of the setup experience. To do this, we’ll add another Installer File to our project and call it UserRegDialog.wxs. Now, change its mark-up to the following:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Fragment>
    <UI Id="UserRegDialogUI">
 
      <Property Id="Proceed">proceedbtn</Property>
      <Binary Id="proceedbtn" SourceFile="images/proceedbtn.bmp"/>
      <Binary Id="headerPic" SourceFile="images/header.bmp"/>
 
      <Dialog Id="UserRegDialog" Width="400" Height="300" Title="Silly Software : User Registration">
 
        <Control Id="background" Type="Bitmap" Text="bgPic" Height="300" Width="400" X="0" Y="0" TabSkip="no" />
        <Control Id="header" Type="Bitmap" Text="headerPic" Height="50" Width="400" X="0" Y="0" TabSkip="no" />
        <Control Id="headerText"  Type="Text" X="65" Y="10" Width="350" Height="40" Transparent="yes" Text="{TahomaBig}User Registration" />
 
        <Control Id="explanationText" X="85" Y="75" NoWrap="no" RightAligned="no" Transparent="yes" Type="Text" Width="250" Height="100" Text="{TahomaNormal}Before you can use this awesome product, you need to register. If you choose not to install this application, click on the Cancel button to exit." />
 
        <Control Id="nameLabel" Type="Text" X="85" Y="120" Height="17" Width="65" Transparent="yes" Text="{TahomaNormal}Your Full Name:" />
        <Control Id="nameTextbox" Type="Edit" X="150" Y="117"  Height="17" Width="120" Property="FULLNAMEProperty"  />
 
        <Control Id="emailLabel" Type="Text" X="85" Y="140" Height="17" Width="65" Transparent="yes" Text="{TahomaNormal}Your E-mail:" />
        <Control Id="emailTextbox" Type="Edit" X="150" Y="137"  Height="17" Width="120" Property="EMAILProperty"  />
 
        <Control Id="proceedButton" Type="PushButton" Text="[Proceed]" Height="62" Width="222" X="90" Y="180" Bitmap="yes">
          <Publish Event="DoAction" Value="RegistrationInfoCustomAction">1</Publish>
          <Publish Event="EndDialog" Value="Return">1</Publish>
        </Control>
 
        <Control Id="cancelButton" Type="PushButton" Text="[Cancel]" Height="40" Width="144" X="135" Y="245" Cancel="yes" Bitmap="yes">
          <Publish Event="EndDialog" Value="Exit" />
        </Control>
 
      </Dialog>
 
    </UI>
 
    <InstallUISequence>
      <Show Dialog="UserRegDialog" After="SetupDialog" />
    </InstallUISequence>
 
  </Fragment>
 
  <Fragment>
    <Binary Id="CustomActionBinary" SourceFile="$(var.RegistrationInfoCustomAction.TargetDir)$(var.RegistrationInfoCustomAction.TargetName).CA.dll"/>
    <CustomAction Id="RegistrationInfoCustomAction" BinaryKey="CustomActionBinary" DllEntry="SaveUserInfo"  />
  </Fragment>
 
</Wix>

The mark-up is pretty straight forward, but the most import bit which we’ll need to pay attention to is the proceedButton Control element. You’ll notice it contains a child Publish element whose Event attribute is set to DoAction and its Value attribute is set to the Id of the CustomAction element further down in the file. This will cause the custom action to execute as soon as the user clicks the Proceed button on the UI.

The custom action will use the emailTextbox and nameTexbox control elements’ Property attribute values to save the information the user entered.

Creating the custom action

The last step will be to create a custom action that will save the user’s registration information to a text file. Add a new C# Custom Action Project to your Visual Studio solution:

In the CustomAction.cs file, change the CustomAction1 methods’ name to SaveUserInfo and add the following code to it:

[CustomAction]
 public static ActionResult SaveUserInfo(Session session)
 {
     string name = session["FULLNAMEProperty"];
     string email = session["EMAILProperty"];
 
     string appdataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
     if (!Directory.Exists(appdataPath + "Win App"))
         Directory.CreateDirectory(appdataPath + "Win App");
 
     File.WriteAllText(appdataPath + "Win AppregistrationInfo.txt", name + "," + email);
 
     return ActionResult.Success;
 }

The above code uses the values the user entered during setup and saves it to a text file. The two controls are referenced by the values contained in their Property attributes, e.g.:

<Control Id="nameTextbox" Type="Edit" X="150" Y="117"  Height="17" Width="120" Property="FULLNAMEProperty"  />
<Control Id="emailTextbox" Type="Edit" X="150" Y="137"  Height="17" Width="120" Property="EMAILProperty"  />

You can now build your setup project and will see a registrattioninfo.txt file in the C:Users<username>AppDataRoamingWin App folder after installation has completed.

Thank you for reading. Until next time, keep coding!

Available downloads:

Custom WiX UI project

You may also be interested in:

67 Comments

  • https://secure.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=32 Anonymous says:

    not compiled

  • https://secure.gravatar.com/avatar/e1a4c2b21a5186e0b27c1c601f418b76?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Pieter van der Westhuizen says:

    Hi There,

    Are you having trouble compiling the sample project?

  • https://secure.gravatar.com/avatar/ef9290b6fda7fde7b9e1f7a9c146dd14?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Tom says:

    Where did you get the images????

  • https://secure.gravatar.com/avatar/e1a4c2b21a5186e0b27c1c601f418b76?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Pieter van der Westhuizen says:

    Hi Tom,

    The icons were generated using Syncfusion Metro Studio 2

  • https://secure.gravatar.com/avatar/8a0a137f87d69c6b56ed1a1e634701e2?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andree says:

    Hi Pieter,

    so where did you place the properties defined in the ‘Edit’ controls?.
    I always got an error when i try to implement the ‘Edit’ controls.

  • https://secure.gravatar.com/avatar/e1a4c2b21a5186e0b27c1c601f418b76?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Pieter van der Westhuizen says:

    Hi Andree,

    The FULLNAMEProperty for example is declared int he UserRegDialog.wxs file:
    <Control Id="nameTextbox" Type="Edit" X="150" Y="117" Height="17" Width="120" Property="FULLNAMEProperty" />

    The value stored in the FULLNAMEProperty is then accessed in the CustomActions.cs class in the RegistrationInfoCustomAction project:

    [CustomAction]
    public static ActionResult SaveUserInfo(Session session)
    {
    string name = session[“FULLNAMEProperty”];

    Is this what you’re looking for?

  • https://secure.gravatar.com/avatar/03c2626fea707d60ddc2a1a0eaf708a9?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G greg says:

    how would you link the CustomAction.cs file with the UserRegDialog.wxs when compiling? I tried to look it up and saw examples where people added the following to a .wsx file:

    but I’m still not sure how that links the customaction to the control event. Any clarification would be appreciated. Thanks!

  • https://secure.gravatar.com/avatar/e1a4c2b21a5186e0b27c1c601f418b76?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Pieter van der Westhuizen says:

    Hi Greg,

    I hope I’m understanding what you meant : )
    To link the custom action, you’ll need to add a reference to it in your Wix project by right-clicking on the References and selecting Add Reference. From tehre click on the Projects tab and choose your custom action project.

  • https://secure.gravatar.com/avatar/ffd7a826224d9737b4f7bc54f8761dcd?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Marty says:

    Hi Pieter.
    Thank you for your excellent article.
    Could you please provide a simple example of how to add the final ExitDialog? I’m still not able to achieve it, thanks a lot.

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello Marty,

    That dialog is a special one. It is added automatically when you add any standard dialogs. It is absent in the dialog tree because it may be shown at different moments under different conditions, say, when your installer fails. If you need to customize it, please see e.g. http://www.dizzymonkeydesign.com/blog/misc/adding-and-customizing-dlgs-in-wix-3/.

  • https://secure.gravatar.com/avatar/ffd7a826224d9737b4f7bc54f8761dcd?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Marty says:

    Thanks for your answer. Maybe we misunderstood, in fact, I need to add the 4th dialog, shown after the Progress Dialog, with the message “Installation was successful” and the Finish button.
    My code in the CustomSuccessDialog.wxs does not work:

    Could you help please?

  • https://secure.gravatar.com/avatar/ffd7a826224d9737b4f7bc54f8761dcd?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Marty says:

    <InstallUISequence>
    <Show Dialog=”CustomSuccessDialog” After=”ProgressDialog” />
    </InstallUISequence>

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello Marty,

    Oh, it appears I responded assuming you are using pure WiX. Now I suppose that you use the WiX Designer. If so, right-click the setup project, choose User Interface Editor in the context menu. In the UI editor, expand the entry End (under the Install node) and make sure there’s a node called Finished below it.

    If you think I still respond in a wrong way, please provide more details about what you do. I just can’t imagine why would you need to add that dialog. Isn’t it already added? Does it show up if you start the installer?

  • https://secure.gravatar.com/avatar/ffd7a826224d9737b4f7bc54f8761dcd?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Marty says:

    Hello,
    yes, I use the pure WiX and the steps according to this article, I don’t use the WiX Designer. I need to inform an user, that installation completed successfully. That is why I need to add the last dialog with the “successful” message. I don’t know how to add the 4th dialog in my source code. When I start the installer, then nothing is shown after the “Progress Dialog”. Is that more clear now?

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Well, yes, it is more clear. Still, I don’t understand how you’ve added the other three dialogs. At http://wixtoolset.org/documentation/manual/v3/wixui/wixui_dialog_library.html they describe using dialog sets supported by WiX. Note that all dialog sets on that page show ExitDlg. At http://wixtoolset.org/documentation/manual/v3/wixui/wixui_customizations.html they describe how to customize the dialog sets; also this page shows how to customize ExitDlg.

  • https://secure.gravatar.com/avatar/ffd7a826224d9737b4f7bc54f8761dcd?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Marty says:

    I’m sorry Andrei. I think you don’t answer to this article. But still thank you for your time.

  • https://secure.gravatar.com/avatar/ab4ec2858cfdf1e44dadf8c50fae314d?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Dmitry Kostochko (Add-in Express Team) says:

    Hi Marty,

    I managed to show such custom dialog by using the following sequence:
    <InstallUISequence>
    <Show Dialog=”CustomSuccessDialog” OnExit=”success” />
    </InstallUISequence>

    Please try this. I can send a complete sample if you wish.

  • https://secure.gravatar.com/avatar/4021d3cf50f00362cb1c73284f3a2c04?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Nithin Thomas says:

    Some more clarity is needed !!

  • https://secure.gravatar.com/avatar/ab4ec2858cfdf1e44dadf8c50fae314d?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Dmitry Kostochko (Add-in Express Team) says:

    Hi Nithin,

    Please specify exactly what part(s) requires clarification.

  • https://secure.gravatar.com/avatar/18be74c7e4c48e7408a634559f612f1f?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Brian Tyson says:

    Hi Pieter,

    How did you change the progress bar’s colour to blue? As i see the code of progress dialog, there is no special effort to achieve that.

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello Brian,

    I assume the color of the progress bar is taken from the Windows color scheme. According to the links below, you can’t control the color of that control.

    http://wixtoolset.org/documentation/manual/v3/xsd/wix/control.html
    https://msdn.microsoft.com/library/aa368044.aspx
    https://msdn.microsoft.com/en-us/library/aa370885.aspx

  • https://secure.gravatar.com/avatar/7f73079660c5e591fccb50386250ff60?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G keerthi says:

    Hi,

    Am very new to this WiX setup project.
    In this project am unable see the ProgressDialog.wxs file.

    And here some errors are occurring
    1) The system cannot find the file ‘..WinAppBinDebugWinApp.exe’
    2) The system cannot find the file ‘..WinAppBinDebugReadMe.txt’
    3) The system cannot find the file ‘c:\users\keerthika\documents\visual studio
    2015\projects\SillySoftware\RegistrationInfoCustomAction\bin\Debug\CustomAction.config’
    4) The system cannot find the file ‘c:\users\keerthika\documents\visual studio
    2015\projects\SillySoftware\RegistrationInfoCustomAction\bin\Debug\RegistrationInfoCustom
    Action.dll’
    5) The system cannot find the file ‘c:\users\keerthika\documents\visual studio
    2015\projects\SillySoftware\RegistrationInfoCustomAction\bin\Debug\Microsoft.Deployment.W
    indowsInstaller.dll’
    6) The system cannot find the file ‘c:\users\keerthika\documents\visual studio
    2015\projects\SillySoftware\RegistrationInfoCustomAction\bin\Debug\RegistrationInfoCustom
    Action.CA.dll’.

    Please guide me why am facing these problems, What i did wrong or is anything else required to add

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello keerthi,

    I’ve downloaded the solution above. I can build it in VS 2015 with no issues. ProgressDialog.wxs is listed under the setup project node in Solution Explorer.

    I have the following programs installed:
    – WiX 3.11; I see it in Control Panel | Programs And Features
    – WiX Toolset Visual Studio Extension; I see this one in the About dialog of VIsual Studio

  • https://secure.gravatar.com/avatar/7f73079660c5e591fccb50386250ff60?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G keerthi says:

    Hi,

    When an trying to build the above project am facing a problem

    Either
    ‘Microsoft.Tools.WindowsInstallerXml.AssemblyDeafuaultWixExtensionAttribute’ was not defined in the assembly or the type definition in extension ‘..RegistrationInfoCustomAction\bin\Debug\RegistrationInfoCustomActiom.dll’ could noit be loaded.

    What is the solution for the above error

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello keerthi,

    I cannot reproduce this issue. I suggest that you google for
    ‘WindowsInstallerXml.AssemblyDefaultWixExtensionAttribute was not defined in the assembly’.

  • https://secure.gravatar.com/avatar/7f73079660c5e591fccb50386250ff60?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G keerthi says:

    Hi,

    Downloaded solution is OK. I can also built it with no issues but When created my own project as it is like this am facing the problem like

    ” ‘Either Microsoft.Tools.WindowsInstallerXml.AssemblyDefaultWixExtensionAttribute’ was not defined in the assembly or the type defined in extension ‘..\RegistrationInfoCustomAction\bin\Debug\RegistrationInfoCustomAction.dll’ coult not be loaded “.

    What is the reason for this error.

    Thanks in advance

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello keerthi,

    I cannot reproduce this issue. I suggest that you google for the error message that you get.

  • https://secure.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=32 Sam says:

    How can I do all this with MFC dialogs?

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello Sam,

    WiX dialogs are actually XML constructs providing data for the interpreter: Microsoft Installer works behind any MSI installer. The only place for you to show a custom non-MSI dialog is a custom action executable.

  • https://secure.gravatar.com/avatar/81fb786b710f2320ae464f98a422593f?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G mohit says:

    where is the text file save?
    pls provide steps to find text file in system.

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello Mohit,

    I suggest that you check the sample project’s files.

  • https://secure.gravatar.com/avatar/81fb786b710f2320ae464f98a422593f?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G mohit says:

    Thanks,
    I got it.

  • https://secure.gravatar.com/avatar/81fb786b710f2320ae464f98a422593f?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G mohit says:

    Hi,
    I have a text file called as test.txt,so i want to show text file data into textfield area in dialog during installation process or on before install.
    pls help me,how can i do?

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello Mohit,

    Check how the licens is shown.

  • https://secure.gravatar.com/avatar/81fb786b710f2320ae464f98a422593f?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G mohit says:

    Thanks.

  • https://secure.gravatar.com/avatar/81fb786b710f2320ae464f98a422593f?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G mohit says:

    I have an issue ,

    “the installer has encountered an unexpected error installing this package this may indicate a problem with this package.error code is 2819″.
    pls help me.
    Thanks.

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello Mohit,

    We can provide such help only as part of our support services. If you have an active Add-in Express subscription, please send me information relating to this issue to the support email address; see the contact form at https://www.add-in-express.com/support/askus.php.

  • https://secure.gravatar.com/avatar/88bce455154e265327b7153bde2dbc28?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G canhnt says:

    Hi, how to check EMAIL and FULLNAME Property? if email, or fullname is empty then show dialog show message error ?

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello,

    I suggest that you google for those properties as I don’t know them. As to showing the message I suggest that you google for how to check built-in and custom properties in WiX.

  • https://secure.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=32 Victor says:

    I’ve downloaded the app and built it through vs but when I try build my own project I’m getting some errors that are hard to understand on google.

    error LGHT0204: ICE20: ErrorDialog Property not specified in Property table. Required property for determining the name of your ErrorDialog
    error LGHT0204: ICE20: FatalError dialog/action not found in ‘InstallUISequence’ Sequence Table.
    error LGHT0204: ICE20: FatalError dialog/action not found in ‘AdminUISequence’ Sequence Table.
    error LGHT0204: ICE20: UserExit dialog/action not found in ‘InstallUISequence’ Sequence Table.
    error LGHT0204: ICE20: UserExit dialog/action not found in ‘AdminUISequence’ Sequence Table.
    error LGHT0204: ICE20: Exit dialog/action not found in ‘InstallUISequence’ Sequence Table.
    error LGHT0204: ICE20: Exit dialog/action not found in ‘AdminUISequence’ Sequence Table.

    Not sure why it’s happening to my own project when not happening on the project that I downloaded. The project is almost identical.

  • https://secure.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=32 Victor says:

    I was able to figure out the problem for the ICE20 but now I am unable to install because the custom action dll is having an issue, anyone else get this issue?

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello Victor,

    I suggest that you use Google or any other search engine supplying it with the text of the error message that you receive.

  • https://secure.gravatar.com/avatar/a5b9d8ea8c24aaafdb170970af3f7ce4?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Elena says:

    @Victor
    Hi, I had the same problem… resolved adding “Finished” dialog for End sequences of both Insall and Administrative Install (on user Interface editor of Designer)

    I hope this helps,
    Elena.

    P.S.: sorry for my poor english :)

  • https://secure.gravatar.com/avatar/355abd514e8708c16b0f118a5c53a9ae?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Dorababu says:

    How to add project output also if the username and email are not entered show a message box, how can do that

  • https://secure.gravatar.com/avatar/355abd514e8708c16b0f118a5c53a9ae?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Dorababu says:

    Victor I am facing the same issue how did you resolved it. Also I tried validating the custom action when user didn’t enter any information how can we validate and proceed further.

    error LGHT0204: ICE20: ErrorDialog Property not specified in Property table. Required property for determining the name of your ErrorDialog
    error LGHT0204: ICE20: FatalError dialog/action not found in ‘InstallUISequence’ Sequence Table.
    error LGHT0204: ICE20: FatalError dialog/action not found in ‘AdminUISequence’ Sequence Table.
    error LGHT0204: ICE20: UserExit dialog/action not found in ‘InstallUISequence’ Sequence Table.
    error LGHT0204: ICE20: UserExit dialog/action not found in ‘AdminUISequence’ Sequence Table.
    error LGHT0204: ICE20: Exit dialog/action not found in ‘InstallUISequence’ Sequence Table.
    error LGHT0204: ICE20: Exit dialog/action not found in ‘AdminUISequence’ Sequence Table.

  • https://secure.gravatar.com/avatar/355abd514e8708c16b0f118a5c53a9ae?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Dorababu says:

    How to stop installation when Action Result return failure

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello Dorababu,

    With Designer for WiX setup projects, I open the File System Editor and add a project output using an item in the UI. To show a message box if something isn’t entered, you need to modify the code behind the Next button.

    As to the error message you receive, I suggest that you use Google or any other search engine supplying it with the text of the error message.

  • https://secure.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=32 Josh says:

    I get all those too:

    error LGHT0204: ICE20: ErrorDialog Property not specified in Property table. Required property for determining the name of your ErrorDialog
    error LGHT0204: ICE20: FatalError dialog/action not found in ‘InstallUISequence’ Sequence Table.
    error LGHT0204: ICE20: FatalError dialog/action not found in ‘AdminUISequence’ Sequence Table.
    error LGHT0204: ICE20: UserExit dialog/action not found in ‘InstallUISequence’ Sequence Table.
    error LGHT0204: ICE20: UserExit dialog/action not found in ‘AdminUISequence’ Sequence Table.
    error LGHT0204: ICE20: Exit dialog/action not found in ‘InstallUISequence’ Sequence Table.
    error LGHT0204: ICE20: Exit dialog/action not found in ‘AdminUISequence’ Sequence Table.

    I can’t seem to find a straight forward answer anywhere…

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello Josh,

    I don’t know what you do to get these errors. I don’t get them when building the project discussed in this blog.

  • https://secure.gravatar.com/avatar/6960d35255f3da6795892e26602b4f8b?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Achilles says:

    Hello Andrei,

    Thanks for this, was quite helpful.
    Regarding the ICE20 errors, in your project you have the Suppress specific ICE validation activated for ICE20m which is why you cannot see the errors above; however they are there as well.

    I hope this helps.

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello Achilles,

    Thank you for pointing me to that setting! I wasn’t aware of it. We’ll think about what we can do about this project.

  • https://secure.gravatar.com/avatar/240fb50025685e59c12efb6eec4abc07?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Clove Robert says:

    I created an msi using simple wix.
    I wanted to add a new screen to it then i got your page link.
    The only problem i see is you are taking the exe from debug and you are hard coding the same.
    Also can you add an example asking user a choice where user would like to install the software.

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello Clove,

    Thank you for the suggestion.

  • https://secure.gravatar.com/avatar/626d7fd6a4b303a32a2af69e9ec4dfa2?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Namrata says:

    Hi Pieter,

    I am completely new to wix Toolset.
    I downloaded source code.It is working as given. I only change path of appdataPath like string appdataPath = “D:\\temp”;.I am getting session value empty.

    what can I do or any other way to save user Info.

    Thanks in Advance.

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello Namrata,

    I suggest that you start with the WiX manual at https://wixtoolset.org/documentation/manual/v3/.

  • https://secure.gravatar.com/avatar/626d7fd6a4b303a32a2af69e9ec4dfa2?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Namrata says:

    Hi Andrei,

    Thanks for suggestion.I’m reading that tutorials.

    when I debug my code then I figure out Custom action called twice.
    because of that first time I get value in session.and second time it get blank and overwrite previous value.

  • https://secure.gravatar.com/avatar/c85f19a11ec56b4a99c9ddcea4bd2ed2?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Jovan says:

    I have the same issue as Namrata, hte ca is called twice.
    First time with values second time without, what results in file containing only a comma.

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello Jovan,

    Can you send me a project that reproduces this issue? If yes, use the contact form at https://www.add-in-express.com/support/askus.php. Please make sure your message contains a link to this page.

  • https://secure.gravatar.com/avatar/c85f19a11ec56b4a99c9ddcea4bd2ed2?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Jovan says:

    Hi Andrei,

    it’s the example wix app you provide at the end of this article:
    https://www.add-in-express.com/creating-addins-blog/wp-upload/samples/WiXUI.zip

    Article is:
    https://www.add-in-express.com/creating-addins-blog/2014/02/07/add-custom-dialogs-wix-installer/

    I compile it using VS2019. If you need more information, I am here.

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello Jovan,

    I’ve found the cause of the issue. You need to comment out the InstallExecuteSequence as a whole or the Custom alone:


    NOT Installed

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Ah, it is wrongly formatted: I’ll update the post itself in a couple of minutes.

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello Namrata,

    I’m really sorry for my hasty response; I have figured out the source of the issue. I was wrong, the issue belongs to the sample project. I’ll modify it and republish in 10-20 minutes.

  • https://secure.gravatar.com/avatar/c85f19a11ec56b4a99c9ddcea4bd2ed2?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Jovan says:

    Hi Andrei,

    yes, it’s the deferred ca that overrides the file with no values.
    Thanks for the quick response and code fix!

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello All,

    Just want to let everyone know that the issue reported by Namrata and Jovan is fixed, and you can find the updated sample project under “Available downloads” at the end of this post.

    @Namrata, I want to apologize again for being so thoughtless when you first reported the issue. Sorry! I am really ashamed of myself and thankful to you and Jovan for your persistence.

  • https://secure.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=32 Gabo says:

    Una Pregunta. Como haría para llamar un Dialog después que termine la ProgressBar??

  • https://secure.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=32 Gabo says:

    How would I call a Dialog after the ProgressBar finishes?

  • https://secure.gravatar.com/avatar/29957f26ad2d8ba527fd9cc8cfa7b2e0?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&r=G Andrei Smolin (Add-in Express Team) says:

    Hello Gabo,

    I’ve added a file called OneMoreDialog.wxs to the project via the Add New Item dialog. In ProgressDialog.wxs, I’ve inserted and modified by adding this tag: . As to OneMoreDialog, you can show anything you like here; I’ve used a version of UserRegDialog. For me, this doesn’t show ProgressDialog; I believe the dialog is shown too quickly for me to notice it. I think this is because you are expected to control it via events it produces and I didn’t do that. See also https://stackoverflow.com/questions/47988864/wix-progress-bar-in-ui-sequence.

Post a comment

Have any questions? Ask us right now!