4

I have a WiX 3.8 installer Product.wxs that builds correctly in Visual Studio 2010 Professional.
I just wanted to modify the steps workflow of the installer, so I added this just after the Wix/Product/Package XML element:

<UI>
  <Publish Dialog="WelcomeDlg"
           Control="Next"
           Event="NewDialog"
           Value="InstallDirDlg"
           Order="2">1</Publish>
  <Publish Dialog="InstallDirDlg"
           Control="Back"
           Event="NewDialog"
           Value="WelcomeDlg"
           Order="2">1</Publish>
</UI>

Problem: WiX now fails with this message:

Error 13 ICE17: PushButton: 'Next' of Dialog: 'InstallDirDlg' does not have an event defined in the ControlEvent table. It is a 'Do Nothing' button. C:\src\wix38\src\ext\UIExtension\wixlib\InstallDirDlg.wxs 14 1 Installer

What am I doing wrong?

Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373

3 Answers3

4

I think you need a reference to the WiX UI you are modifying. Try this:

<UI>
  <UIRef Id="WixUI_InstallDir" />        <!-- Added line -->

  <Publish Dialog="WelcomeDlg"
           Control="Next"
           Event="NewDialog"
           Value="InstallDirDlg"
           Order="2">1</Publish>
  <Publish Dialog="InstallDirDlg"
           Control="Back"
           Event="NewDialog"
           Value="WelcomeDlg"
           Order="2">1</Publish>
</UI>
Sebastian Ärleryd
  • 1,774
  • 14
  • 19
0

I want to integrate InstallDirDlg to custom UI so I copied and modified Publish statements from WixUI_InstallDir.wxs source code.

Der_Meister
  • 4,771
  • 2
  • 46
  • 53
0

This is for all the people who are running into the same error but using the "WixSharp" libraries. You can use the below sample code. Hope it helps!

public void GenerateMSI()
{
    //generic setup code
    Project project =
        new Project("myinstaller.msi",
            new Dir(@"d:\deployhere\", new Files(@"c:\mybuildfilesarehere\")),
            new Dir(@"d:\deployheretoo\", new Files(@"c:\mybuildfilesarehere\")));
    project.ProductId = new Guid();
    project.GUID = new Guid();

    //#1
    project.UI = WUI.WixUI_InstallDir; 

    //#2 - this will error without #1 (Exepected Error: @3, see below.)
    project.CustomUI =
new DialogSequence()
   .On(NativeDialogs.WelcomeDlg, Buttons.Next,
       new ShowDialog(NativeDialogs.InstallDirDlg))
   .On(NativeDialogs.InstallDirDlg, Buttons.Back,
       new ShowDialog(NativeDialogs.WelcomeDlg));

    Compiler.BuildMsi(project);
}

@3 - ErrorMessage: error LGHT0204 : ICE17: PushButton: 'Next' of Dialog: 'InstallDirDlg' does not have an event defined in the ControlEvent table. It is a 'Do Nothing' button. //ICE17: PushButton: 'ChangeFolder' of Dialog: 'InstallDirDlg' does not have an event defined in the ControlEvent table. It is a 'Do Nothing' button.

DevCod
  • 280
  • 2
  • 11