Typically, if a component depends on a feature, it is simply included as part of that feature.
-----Original Message----- From: Nick Ramirez [mailto:nickra...@hotmail.com] Sent: Wednesday, May 26, 2010 9:55 AM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Component with feature condition not actioned Okay. I think I understand this a bit more now. I think that the action state of components and features are figured out during the FileCost phase, but not set in stone and made available until after CostFinalize. Also, I believe that conditions on components and features are evaluated at the same time, during FileCost. This makes sense since the installer will need to know which components and features will be included at the time it does costing otherwise it might count files that won't get installed anyway. So, putting a feature's action state inside a component condition won't work because action state hasn't been set in stone by CostFinalize yet while conditions are evaluated earlier during FileCost. ??? For illustration, I've got three custom actions that set a property called "MyAction" that tells me what the action state of my feature is. Such as: <CustomAction Id="ShowAction1" Property="MyAction" Value="local" /> <CustomAction Id="ShowAction2" Property="MyAction" Value="absent" /> <CustomAction Id="ShowAction3" Property="MyAction" Value="unknown" /> <InstallUISequence> <Custom Action="ShowAction1" Before="CostFinalize"><![CDATA[&ProductFeature = 3]] ></Custom> <Custom Action="ShowAction2" Before="CostFinalize"><![CDATA[&ProductFeature = 2]] ></Custom> <Custom Action="ShowAction3" Before="CostFinalize"><![CDATA[&ProductFeature = -1]] ></Custom> </InstallUISequence> Then I see this is the log (notice these actions run BEFORE CostFinalize). Action ended 12:41:55: FileCost. Return value 1. MSI (c) (54:8C) [12:41:55:265]: Skipping action: ShowAction1 (condition is false) MSI (c) (54:8C) [12:41:55:265]: Skipping action: ShowAction2 (condition is false) MSI (c) (54:8C) [12:41:55:265]: Doing action: ShowAction3 Action 12:41:55: ShowAction3. Action start 12:41:55: ShowAction3. MSI (c) (54:8C) [12:41:55:265]: PROPERTY CHANGE: Adding MyAction property. Its value is 'unknown'. Action ended 12:41:55: ShowAction3. Return value 1. MSI (c) (54:8C) [12:41:55:265]: Doing action: CostFinalize MSI (c) (54:8C) [12:41:55:265]: Note: 1: 2205 2: 3: ActionText Action 12:41:55: CostFinalize. Computing space requirements Action start 12:41:55: CostFinalize. When I schedule the actions AFTER CostFinalize, the property is set to "local". -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Component-with -feature-condition-not-actioned-tp5101940p5104623.html Sent from the wix-users mailing list archive at Nabble.com. ---------------------------------------------------------------------------- -- _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users