Hi,
In my project, I have set condition on few Components and Features, so that they are installed only when the condition is satisfied. Condition is based on the value of some property.
This works only if I set the property between InstallInitialize & InstallFinalize CAs.
Now, I believe that this is how MSI works.
But, if i set the same condition on some Feature, it works even if the property is set after InstallFinalize.
Now I am confuzed. Someone please help me get out of this confusion.
Where, in Install Sequence, I should set properties.
Also, if I use MsiSetFeatureState function, where in Sequence I should call this?
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

Conditions on Component & Feature
Started by
antyagi
, Mar 18 2006 13:35
3 replies to this topic
Posted 20 March 2006 - 08:09
On NT based systems (NT4, 2000, XP, 2003) CostFinalize runs twice: once in the UI sequence and once in the Execute sequence. Therefore your condition may work on these systems, but not reliably: The disk space calculation in the UI sequence will be wrong (because the condition has no effect there), and it won't work if your setup runs in basic UI or silent mode (UI sequence is skipped)
Stefan Krüger
InstallSite.org twitter facebook
Posted 20 March 2006 - 08:17
Ok assuming that my setup runs in Full UI mode.
When should i set properties that will work as conditions on Feature & Component?
Also, When I set the property after InstallFinalize (UI Sequence) how the same condition worked for the Features but failed for Component?
When should i set properties that will work as conditions on Feature & Component?
Also, When I set the property after InstallFinalize (UI Sequence) how the same condition worked for the Features but failed for Component?
ankur tyagi
Posted 20 March 2006 - 08:26
You should set these proeprties before CostFinalize.
If you need to base the decision on user input, then instead of a condition use the control events AddLocal and Remove on the Next button of a dialog to select/deselect those features.
I don't know why it works for features but not conditions. Basing feature or component conditions on properties that are set after CostFinalize is a bug, so the exact failure behaviour may vary.
If you need to base the decision on user input, then instead of a condition use the control events AddLocal and Remove on the Next button of a dialog to select/deselect those features.
I don't know why it works for features but not conditions. Basing feature or component conditions on properties that are set after CostFinalize is a bug, so the exact failure behaviour may vary.
Stefan Krüger
InstallSite.org twitter facebook