[wix-users] Dialog before cost initialize

Tigran Galoyan tigran.galoyan at gmail.com
Mon Feb 27 08:05:16 PST 2017


Hi Blair,

Not that I doubt what you said about chances that later I may have
unintended consequences if I use conditions defaulted to “0” for features,
however, this technique is nicely documented in the Wix Toolset Tutorial on
FireGiant web-site as Conditional Installation and I believe they had it
properly tested and reviewed before it was included in the tutorial:

https://www.firegiant.com/wix/tutorial/getting-started/
conditional-installation/

However, it's still unclear to me how I can force the Feature List on
SetupTypeDlg to be updated accordingly based on the validation of my serial
number at a previous step on my SerialNumberDlg? I can confirm my
properties are properly set during the custom action launched within the
boundaries of the SerialNumberDlg, but when the SetupTypeDlg opens after,
the features are still visible, whereas, if the SerialNumberDlg is moved to
appear before CostInitialize then later when the UI sequence starts and
the SetupTypeDlg opens when its turn comes then only those features are
displayed that the Level is bumped up to 1 or up using the Condition based
on my properties ( COMPONENTS_A_ENABLED, COMPONENTS_B_ENABLED ) set with my
custom action.

Hi Lewis,

I moved my conditions into <![CDATA[]]> block following your advise. In my
case I cannot show the rest of the features if it's not applicable to that
customer, so I cannot disable I need to hide it, however, even when I tried
to test the installation by disabling, it doesn't take affect. Looks like
at the UI phase after LicenseAgreementDlg it's already too late, Costing is
already done.

Thanks,
Tigram



On Mon, Feb 27, 2017 at 9:15 AM, Lewis Henderson <henderso at opentext.com>
wrote:

> 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=
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>


More information about the wix-users mailing list