1

I want to customize the sequence wix installer by having a custom dialog where I can process an input from a user before proceeding into the installation

I use the

  <UI Id="WixUI_Minimal">
   <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="Minimal" />

   <!--Define all needed dialogs-->
   <DialogRef Id="ErrorDlg" />
   <DialogRef Id="FatalError" />
   <DialogRef Id="FilesInUse" />
   <DialogRef Id="MsiRMFilesInUse" />

   <DialogRef Id="PrepareDlg" />
   <DialogRef Id="ProgressDlg" />
   <DialogRef Id="ResumeDlg" />
   <DialogRef Id="UserExit" />
   <DialogRef Id="WelcomeDlg" />
  
   <DialogRef Id="UserRegDialog" />
   <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="UserRegDialog">1</Publish>
   <Publish Dialog="UserRegDialog" Control="" Event="NewDialog" Value="PrepareDlg">1</Publish>
   <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">2</Publish>
   <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg" Order="2">2</Publish>
   <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg" Order="2">2</Publish>
   <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg" Order="2">2</Publish>
   <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">2</Publish>

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

   <Property Id="ARPNOMODIFY" Value="1" />

  </UI>

My customization is in the part :

where UserRegDialog is my custom dialog

  <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="UserRegDialog">1</Publish>
  <Publish Dialog="UserRegDialog" Control="" Event="NewDialog" Value="PrepareDlg">1</Publish>

but when I build the setup, i'm encountering an issue saying:

ICE03: Not a valid foreign key; Table: ControlEvent, Column: Control_, Key(s): UserRegDialog.Next.NewDialog.PrepareDlg.

Cris M
  • 153
  • 2
  • 6

1 Answers1

2

ICE & ICE3: ICE03 in general explained with an example here.

Referential Integrity: You have left out the Control field for UserRegDialog empty. Why did you do this? This will indeed likely cause ICE03 as this constitutes a broken foreign key into the ControlEvent table (as you will see it has foreign keys into the Dialog and Control tables).

Dialog Sequence: Here is an example on customizing WiX dialog sequence. Have a look to see if it clarifies things. Here is a sample on custom WiX dialogs.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • Great help! I have added the control fields needed, with the Id of Next, and Previous. I thought it is automatically add the next/previous button.. lol.. Now it is working. – Cris M Sep 17 '20 at 01:54