2

I have the following code in my wxs file:

  <UI>
      <Dialog Id="CustomTextA"
              Width="370"
              Height="270"
              Title="$(loc.InstallDirDlg_Title)">
          <Control Id="NextButton"
                   Type="PushButton"
                   X="236"
                   Y="243"
                   Width="56"
                   Height="17"
                   Default="yes"
                   Text="$(loc.WixUINext)">
              <Publish Event="EndDialog"
                       Value="Return"><![CDATA[CustomTextA_NextArgs=""]]></Publish>
              <Publish Event="NewDialog"
                       Value="[CustomTextA_NextArgs]"><![CDATA[CustomTextA_NextArgs<>""]]></Publish>
          </Control>
          ....
      </Dialog>

      <InstallUISequence>
          <Custom Action="CustomTextA_SetProperty_EDIT2"
                  After="CustomTextA_SetProperty_EDIT1" />
          <Custom Action="CustomTextA_SetProperty_EDIT1"
                  After="ValidateProductID" />
          <Custom Action="CustomTextA_SetProperty_EDIT3"
                  After="CustomTextA_SetProperty_EDIT2" />
          <Custom Action="CustomTextA_SetProperty_EDIT4"
                  After="CustomTextA_SetProperty_EDIT3" />

          <Custom Action="ERRCA_UIANDADVERTISED"
                  Before="AppSearch"><![CDATA[ProductState=1]]></Custom>

          <Show Dialog="CustomTextA"
                OnExit="success" />
      </InstallUISequence>

      <AdminUISequence>
          <Show Dialog="CustomTextA"
                OnExit="success" />
      </AdminUISequence>
  </UI>

but CustomTextA dialog is not displayed when the installation finishes successfully, and standard ExitDialog is shown.

What can be wrong in the code?

I am not sure what the customs actions like Custom Action="CustomTextA_SetProperty_EDIT2" for, but I left them to provide the code as it is.

Wix version is 3.11 (Probably something went wrong after upgrading from an earlier Wix version).

Alexey Starinsky
  • 3,699
  • 3
  • 21
  • 57

1 Answers1

1

Summary: Please try to download the sample below and have a look at it in Visual Studio. Also read the step-by-step description below for how to use it as a template. I would gather all GUI-markup inside the WixUI_MyMondo.wxs file. Be sure to skim the previous answers linked too.


WiX Custom Dialog Sample: I have a WiX custom GUI sample here (just click download). It is a "Hello WiX" kind of thing - intended to be as simple as possible, but no simpler. In other words it is just doing a couple of things.

  • It copies the standard WiX dialog source markup in the file WixUI_Mondo.wxs and calls the new file WixUI_MyMondo.wxs. It is put next to Product.wxs.
  • The main Product.wxs file then includes the customized version with <UIRef Id="WixUI_MyMondo" /> (instead of the standard <UIRef Id="WixUI_Mondo" />) allowing the WixUI_MyMondo.wxs file to be changed as desired.
  • The rest of the dialogs are linked from the WixUIExtension.dll file (as normal).
  • I always keep all the dialog events and configurations inside WixUI_MyMondo.wxs - meaning that I try to avoid dialog constructs inside Product.wxs.

Please download and check the sample. It is impossible - as far as I can tell - to deduce more from the markup you have provided.


Previous Answers: Here are two previous answers on the issue of WiX GUI. Rather than rewriting the content in a way that could miss your real question, please skim them will you?


Links: Some further links here on setup GUI. Burn is WiX's setup.exe generator. It can have its own GUI separate from that embedded in MSI files.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • I downloaded the sample, but did not find `OnExit`. How this sample can help? – Alexey Starinsky Nov 07 '19 at 12:10
  • I just had this sample. The idea was that you can experiment with it since it compiles and has an easy to understand structure. Another trick is to search github.com for similar constructs. [Here is a sample search](https://github.com/search?q=OnExit%3D%22success%22+extension%3Awxs). Not able to test anything right now. – Stein Åsmul Nov 08 '19 at 13:10