1

I'm really struggling trying to figure these error out. I'm trying to build a setup using the following sequence:

Welcome Screen License Screen Scope Screen Browse Screen Features Screen Custom Screen Shortcut Screen Install Overview Screen Install/Progress Screen Finish Screen

Rather that jumping into the lot in one go, I thought I'd do them one by one and I got as far as building the Welcome, License, Scope screen.

I then tried to include the Features Screen but I had the error I'll explain below. Strangely enough when I change the FeatureDlg to CustomizeDlg it works.

I then try to introduce the BrowseDlg before the CustomizeDlg but now I keep getting similar errors when I tried to use the FeaturesDlg.

I'm new to Wix so apologies if I've left something obvious out. I'm using VS2013 to build this.

My UI.Wxs has the following code within its UI tags

  <DialogRef Id="BrowseDlg" />
  <DialogRef Id="DiskCostDlg" />
  <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="FeaturesDlg" />-->      
  <DialogRef Id="CustomizeDlg" />

  <!-- Welcome -->
  <Publish Dialog="WelcomeDlg"
           Control="Next"
           Event="NewDialog"
           Value="LicenseAgreementDlg">NOT Installed</Publish>

  <!-- License -->
  <Publish Dialog="LicenseAgreementDlg"
           Control="Back"
           Event="NewDialog"
           Value="WelcomeDlg">1</Publish>

  <Publish Dialog="LicenseAgreementDlg"
           Control="Next"
           Event="NewDialog"
           Value="InstallScopeDlg">LicenseAccepted = "1"</Publish>

  <!-- Scope -->
  <Publish Dialog="InstallScopeDlg"
           Control="Back"
           Event="NewDialog"
           Value="LicenseAgreementDlg">1</Publish>

  <Publish Dialog="InstallScopeDlg"
           Control="Next"
           Event="NewDialog"
           Value="BrowseDlg">1</Publish>

  <!-- BrowseDlg -->
  <Publish Dialog="BrowseDlg"
           Control="Back"
           Event="NewDialog"
           Value="InstallScopeDlg">1</Publish>

  <Publish Dialog="BrowseDlg"
           Control="Next"
           Event="NewDialog"
           Value="CustomizeDlg">1</Publish>

  <!-- Features -->
  <Publish Dialog="CustomizeDlg"
           Control="Back"
           Event="NewDialog"
           Value="BrowseDlg">1</Publish>

  <Publish Dialog="CustomizeDlg"
           Control="Next"
           Event="NewDialog"
           Value="CustomFeaturesDlg">1</Publish>

  <!--Custom Features--><!-- 
  <Publish Dialog="CustomFeaturesDlg"
           Control="Back"
           Event="NewDialog"
           Value="FeaturesDlg">1</Publish>

  <Publish Dialog="CustomFeaturesDlg"
           Control="Finish"
           Event="EndDialog"
           Value="Return">1</Publish>-->

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

  <UIRef Id="WixUI_Common" />

Now the error's I'm getting are:

Error   1   ICE03: Not a valid foreign key; Table: ControlEvent, Column: Control_, Key(s): BrowseDlg.Back.NewDialog.InstallScopeDlg.1
Error   2   ICE03: Not a valid foreign key; Table: ControlEvent, Column: Control_, Key(s): BrowseDlg.Next.NewDialog.CustomizeDlg.1
Error   3   ICE03: Not a valid foreign key; Table: ControlEvent, Column: Control_, Key(s): CustomFeaturesDlg.Finish.EndDialog.Return.1
Error   4   ICE03: Not a valid foreign key; Table: ControlEvent, Column: Control_, Key(s): CustomFeaturesDlg.Back.NewDialog.FeaturesDlg.1
Error   5   ICE17: PushButton: 'Back' of Dialog: 'FeaturesDlg' does not have an event defined in the ControlEvent table. It is a 'Do Nothing' button.

I'm not too worried about the last one... But the 'Foreign' key error is driving me mad.

Can anyone point me in the right direction?

Thanks.

Bogdan Mitrache
  • 9,532
  • 15
  • 30
Thierry
  • 5,514
  • 8
  • 55
  • 97
  • Please check [**this answer**](http://stackoverflow.com/questions/24793346/wix-installer-ice03-invalid-language-id/24793670). – Stein Åsmul Sep 05 '14 at 04:02
  • @thierry have you fixed this? – grabhints Nov 14 '15 at 15:25
  • @micmica Unfortunately I can't remember how I fixed it as it's been so long I've looked at this and once I did get it to work, I moved on and I haven't had to change it since except for updating files. Sorry I didn't update the answer at the time! I do remember taking all my dialogs definitions out and re-adding them one by one always ensuring these were defined in the correct order and each buttons were also defined accordingly and without errors. Sorry I couldn't be more help. – Thierry Nov 14 '15 at 23:08

2 Answers2

1

I guess you wanted to use InstallDirDlg instead of BrowseDlg. BrowseDlg is just the folder-selection dialog which is opened from InstallDirDlg when you want to change default installation location. It contains buttons OK and Cancel (there is no Back and Next).

Look here for an example: WiX installer fails with error code 2819 (and don't forget to add WIXUI_INSTALLDIR property - see the comments below).

For the CustomFeaturesDlg it's most likely the same story.

Community
  • 1
  • 1
Jan Manek
  • 11
  • 1
  • You are correct about the InstallDirDlg vs BrowseDlg. I want to display the installation folder during my installation. What dialog should I be using then? I'll go check the link you provided and see if it helps. Thanks. – Thierry Sep 18 '14 at 09:29
0

You can check this answer for some overall ICE info (recommended read if you are unsure what ICE checks do). Here is the ICE03 MSDN page - as you see there are many different errors possible in this particular ICE since it is concerned with overall database referential integrity (that the foreign keys match in linked tables so that they can be joined).

I have never dealt with dialogs in Wix this way, I always just use the default dialog set as explained here - it is nice and simple and does the job auto-magically. However, I have dealt with Installshield dialogs in sequence, and it is always a matter of syncing up the next and previous button events on each dialog to allow the proper dialog sequence to unfold as the buttons are pressed. It works like a doubly linked list of sorts with proper pointers to what the next dialog should be. If messed up the dialogs show up haphazardly - which can turn into very strange behavior. For example a button might not work at all, it might take you to the wrong dialog or it could even start the whole install prematurely.

In conclusion: you need to go over the compiled MSI to verify that the dialog sequence is working, both interactively whilst running the setup, and by inspecting the compiled MSI using Orca or a similar tool. Perhaps this description of Orca is helpful too? I have seen foreign key problems like this relate to capitalization or even whitespace, or a genuine mismatch.

Community
  • 1
  • 1
Stein Åsmul
  • 34,628
  • 23
  • 78
  • 140
  • Sorry for the long delay getting back. Pushed away to another project! While I understand what you're saying in regards to linking each next/previous button to a valid dialog, it's still not resolving my problem and I think it's related to the fact that some buttons do not exist in some of the dialog, so I'm currently looking at each individual dialog box in codeplex to see exactly what button are available. Using the standard set up is not an option as I need custom dialog to be included but thanks for the very detailed feedback! – Thierry Sep 18 '14 at 09:26