[wix-users] Dialog before cost initialize

Lewis Henderson henderso at opentext.com
Mon Feb 27 06:15:47 PST 2017


Hi Tigran,

I have a similar situation in my installs.  I also set the features levels to "1" initially, and then disable them during validation (after LicenseAgreementDlg).  I also put the condition test in a <![CDATA[]]> so it gets re-evaluated:

<Feature Id='Components_A' Level='1' ConfigurableDirectory='MY_DIR'>
    <Condition Level="0"><![CDATA[COMPONENTS_A_ENABLED = "0"]]></Condition>
    ...

This works for me, but the feature still shows up in the CustomizeDlg selection tree.  If a "disabled" feature is selected, it doesn't really get selected for the install, so that's just an inconvenience.  I'm still looking for a way to remove the "disabled" features from the CustomizeDlg tree.

				Lewis Henderson
				OpenText Corporation

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Blair Murri
Sent: Saturday, February 25, 2017 10:54 AM
To: Tigran Galoyan <tigran.galoyan at gmail.com>; WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Dialog before cost initialize

Setting feature (and component) conditions to default of "0" leads to all sorts of unintended consequences, including problems removing them later. There should be an ICE for that.



You should instead disable them if the validation does not allow them.



There are also actions that change feature actions in response to UI actions, so sequence needn't be an issue. However, be warned that child features may not automatically follow their parents in the feature tree, so you may need to be explicit.



Blair Murri



Sent from my Windows 10 phone



From: Tigran Galoyan<mailto:tigran.galoyan at gmail.com>
Sent: Friday, February 24, 2017 2:31 PM
To: WiX Toolset Users Mailing List<mailto:wix-users at lists.wixtoolset.org>
Subject: [wix-users] Dialog before cost initialize



Hi,


I have a task to implement conditional installation. What exactly that means in my case, to enable/disable some features with conditions. For
instance:

<Feature Id='Components_A' Level='0' ConfigurableDirectory='MY_DIR'>
    <Condition Level="1">(COMPONENTS_A_ENABLED = "1")</Condition>
    <ComponentGroupRef Id="Components_A" /> </Feature> <Feature Id='Components_B' Level='0' ConfigurableDirectory='MY_DIR'>
    <Condition Level="1">(COMPONENTS_B_ENABLED = "1")</Condition>
    <ComponentGroupRef Id="Components_B" /> </Feature>

So as you can see if I have COMPONENTS_A_ENABLED or COMPONENTS_B_ENABLED defined right in my code where those are declared then during the costing stage it will be clear to count those or not.

However, those properties are defined with 0 value at the time of the declaration and I set their values during my Serial Number validation UI page; the latter comes after the LicenseAgreementDlg. Within the boundaries of that page I call custom action to validate the entered serial number and also define which components will be installed, so that's exactly where I set the values for COMPONENTS_A_ENABLED and/or COMPONENTS_B_ENABLED to "1".

Unfortunately, it's too late to have it done at that stage, since when later the SetupTypeDlg opens I can see that none of the components are listed as the initial value for those were set to "0". But if I move my Serial Number validation page to be displayed right at the beginning before the CostInitialize then later when the UI starts and after LicenseAgreementDlg the SetupTypeDlg opens I can see that my changes in the custom action that run within the boundaries of the serial number page play roll now :

<InstallUISequence>
    <Show Dialog="SerialNumberDlg" Before="CostInitialize" /> </InstallUISequence>

Definitely the costing and filtering of which features will appear on SetupTypeDlg based on conditions are done before the UI sequence that's why my initial approach didn't work whereas the workaround to show the serial number dialog before CostInitialize worked.

So my question is if there is a way to handle this without being forced to call the serial number dialog before the costinitialize, rather, by letting it open after LicenseAgreementDlg as it supposed to and upon entry of a valid serial number and setting the values of the  COMPONENTS_A_ENABLED and/or COMPONENTS_B_ENABLED properties in the custom action based on the serial number, to redo the costing again and when the SetupTypeDlg opens later I can see the components listed there based on the property values mentioned?


Thanks,
Tigran

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=DwIF-g&c=ZgVRmm3mf2P1-XDAyDsu4A&r=yAhF6NGJ7EPmZkvswZOswwnYxaueKkO53V282tTn1P4&m=ddsYVPOisrKnyQ08l-yMrsUyvuTpG1ZlL183qmXLZq4&s=bzP3-ArtfvM7Y-jVfoLz7d_YQJ5fKIszeq23P707s2A&e= 

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=DwIF-g&c=ZgVRmm3mf2P1-XDAyDsu4A&r=yAhF6NGJ7EPmZkvswZOswwnYxaueKkO53V282tTn1P4&m=ddsYVPOisrKnyQ08l-yMrsUyvuTpG1ZlL183qmXLZq4&s=bzP3-ArtfvM7Y-jVfoLz7d_YQJ5fKIszeq23P707s2A&e= 


More information about the wix-users mailing list