[wix-users] Dialog before cost initialize

Fyodor Koryazhkin fyodorkor at gmail.com
Tue Feb 28 00:33:03 PST 2017


Hi,
According to my understanding you cannot create Feature condition based on
other Feature state or component state. This is because all features and
components states are resolved during CostFinalize standard action and you
do not know for sure what component/feature is resolved first.


On Sat, Feb 25, 2017 at 12:31 AM, Tigran Galoyan <tigran.galoyan at gmail.com>
wrote:

> 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
> http://www.firegiant.com/
>



-- 
Regards,
Fyodor Koryazhkin..


More information about the wix-users mailing list