Reputation: 6199
I have a custom dialog that is showen when InstallPEDatabase
feature is selected.
Here is that part of the sequence where MyEditConfig
is my custom dialog:
<Publish Dialog="MyCustomizeDlg" Control="Next" Event="NewDialog" Value="MyEditConfigDlg"><![CDATA[(&CreatePEDatabase=3)]]></Publish>
<Publish Dialog="MyCustomizeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg"><![CDATA[NOT(&CreatePEDatabase=3)]]></Publish>
<Publish Dialog="MyEditConfigDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MyEditConfigDlg" Control="Back" Event="NewDialog" Value="MyCustomizeDlg">1</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MyCustomizeDlg" Order="1">NOT CreatePEDatabase = 3 AND NOT Installed OR WixUI_InstallMode = "Change"</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MyEditConfigDlg" Order="2">CreatePEDatabase = 3 AND NOT Installed OR WixUI_InstallMode = "Change"</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="3">Installed AND NOT PATCH</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="4">Installed AND PATCH</Publish>
Like this it works for selecting the feature then the MyEditConfigDlg
is presented and when feature is not selected then it is not presented. The problem is that when i click next from my custom dialog and go to VerifyReadyDlg
and click back from there it takes me back to the MyCustomizeDlg
instead of MyEditConfigDlg.
I know there is something wrong with the conditions, but i just cant figure out what.
Upvotes: 2
Views: 5806
Reputation: 1655
The syntax of the "feature" CreatePEDatabase is being specified as a "property" (variable without a prefix). You need to prefix features with an ampersand. As it is now, the test is asking "NOT(Is the Property CreatePEDatabase =3)" which will be true because that property doesn't exist and is not equal to anything. If you change the syntax to a feature, then it will be evaluted correctly.
Here's a great summary of the syntax used by the MSI engine (which reads the WiX resulting MSI file): http://msdn.microsoft.com/en-us/library/aa368012(VS.85).aspx
Also, you can omit the "Order" values, as those are only used in special cases of multiple dialogs for the same conditions. Your tests will make each situation unique.
Upvotes: 3