wixwix3wix5

wix UI not showing custom Dialogue or print button error


I upgraded my current installer from wix 3 to wix 5 and now my custom dialogue shows the Error: "Print button of LiecenseAgreementDlg does not have an event defined in the ControlEvent table. It is a Do Nothing button"

If I try to change it or create a new Custom Dialogue, the dialogue is not shown in my UI.

I tried two UIs

This one leads to the Print button error:

<!--
First-time install dialog sequence:
 - WixUI_WelcomeDlg
 - WixUI_LicenseAgreementDlg
 - WixUI_CustomizeDlg
 - WixUI_VerifyReadyDlg
 - WixUI_DiskCostDlg
Maintenance dialog sequence:
 - WixUI_MaintenanceWelcomeDlg
 - WixUI_MaintenanceTypeDlg
 - WixUI_CustomizeDlg
 - WixUI_VerifyReadyDlg
Patch dialog sequence:
 - WixUI_WelcomeDlg
 - WixUI_VerifyReadyDlg
-->

<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
    <Fragment>
        <UI Id="WixUI_EAS">
            <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
            <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
            <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />

            <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
            <Property Id="WixUI_Mode" Value="FeatureTree" />

            <DialogRef Id="ErrorDlg" />
            <DialogRef Id="FatalError" />
            <DialogRef Id="FilesInUse" />
            <DialogRef Id="MsiRMFilesInUse" />
            <DialogRef Id="PrepareDlg" />
            <DialogRef Id="ProgressDlg" />
            <DialogRef Id="ResumeDlg" />
            <DialogRef Id="UserExit" />

            <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999" />

            <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg" Condition="NOT Installed" />
            <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Condition="Installed AND PATCH" />

            <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" />
            <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="CustomizeDlg" Condition="LicenseAccepted = &quot;1&quot;" />

            <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="1" Condition="Installed" />
            <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg" Order="2" Condition="NOT Installed" />
            <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="EasSettingDlg" />

            <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="EasSettingDlg" Order="1" Condition="NOT Installed OR WixUI_InstallMode = &quot;Change&quot;" />
            <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2" Condition="Installed AND NOT PATCH" />
            <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="3" Condition="Installed AND PATCH" />

            <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg" />

            <Publish Dialog="MaintenanceTypeDlg" Control="ChangeButton" Event="NewDialog" Value="CustomizeDlg" />
            <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg" />
            <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg" />
            <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg" />

            <Publish Dialog="EasSettingDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="2" Condition="NOT Installed" />
            <Publish Dialog="EasSettingDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" />
            <Publish Dialog="EasSettingDlg" Control="Cancel" Event="NewDialog" Value="ExitDialog"></Publish>

            <Dialog Id="EasSettingDlg" Width="370" Height="270" Title="[ProductName] Setup">        
                <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.LicenseAgreementDlgBannerBitmap)" />
                <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
                <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
                <Control Id="Description" Type="Text" X="25" Y="23" Width="340" Height="15" Transparent="yes" NoPrefix="yes" Text="Set general setup options" />
                <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="{\WixUI_Font_Title}General Options" />
                <Control Id="RestoreConfig" Type="CheckBox" X="20" Y="71" Width="330" Height="18" CheckBoxValue="1" Property="RESTORECONFIGFILE" Text="Reset all settings and configuration files to factory defaults" />
                <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
                <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" />
                <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)" />                     
            </Dialog>
        </UI>
        <UIRef Id="WixUI_Common" />
    </Fragment>
</Wix>


And this one doesn't even show my custom dialogue:

<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
    <Fragment>
        <UI Id="MyCustomUI">
            <ui:WixUI Id="WixUI_InstallDir" />
            <Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER"/>

            <!-- Define your custom dialog -->
            <Dialog Id="MyCustomDialog" Width="370" Height="270" Title="[ProductName] Setup">       
                <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.LicenseAgreementDlgBannerBitmap)" />
                <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
                <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
                <Control Id="Description" Type="Text" X="25" Y="23" Width="340" Height="15" Transparent="yes" NoPrefix="yes" Text="Set general setup options" />
                <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="{\WixUI_Font_Title}General Options" />
                <Control Id="RestoreConfig" Type="CheckBox" X="20" Y="71" Width="330" Height="18" CheckBoxValue="1" Property="RESTORECONFIGFILE" Text="Reset all settings and configuration files to factory defaults" />
                <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
                <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" />
                <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)" />                     
            </Dialog>

            <!-- Navigation: Insert your custom dialog into the sequence -->
            <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="MyCustomDialog"/>
            <Publish Dialog="MyCustomDialog" Control="Back" Event="NewDialog" Value="InstallDirDlg"/>
            <Publish Dialog="MyCustomDialog" Control="Next" Event="NewDialog" Value="VerifyReadyDlg"/>
            <Publish Dialog="MyCustomDialog" Control="Cancel" Event="NewDialog" Value="ExitDialog"/>
        </UI>
    </Fragment>
</Wix>

This is the UI part of my Product.wxs:

<UI>
        <UIRef Id="MyCustomUI" />
</UI>


Solution

  • You need to read the upgrade documentation for both v3 to v4 and v4 to v5. In particular, from Converting custom WixUI dialog sets

    Because of WiX v4's support for platform-specific custom actions, customizing WixUI dialog sets, especially when adding and removing dialogs, requires some care. The WixUI documentation describes what to do when creating a new custom dialog set. You'll want to make the same kind of change when converting a custom dialog set you created using WiX v3 to WiX v4. The key point is to isolate any DoAction control events that call custom actions to create platform-specific variants.

    More detail is found in the upgrade guides.