Jump to content


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.
Photo

Component condition evaluation - Please help!!


5 replies to this topic

rbrinda

rbrinda
  • Full Members
  • 65 posts

Posted 28 July 2005 - 00:05

Hi,

I posted this in microsoft.public.windows.msi but thought i'd post here too.

-------------------
I read in MSI documentation for Component Table that we can use feature
states in the expression used for component condition. So in my install
project, i'm trying to do the following:


Component Condition
comp1 &Feature2 <> 3


where comp1 is in Feature1. I was expecting that using this condition, comp1
will get installed only when Feature2 is NOT installed. But comp1 always
gets installed (regardless of the feature state of Feature2). Is this the
expected behavior?


Well, i tried another scenario as well:


Component Condition
comp1 &Feature2 = 3


where comp1 is in Feature1. Now, i was expecting that comp1 will get
installed if Feature2 is selected for installation. But comp1 NEVER gets
installed (even when Feature2 is selected).


I'm not sure if i'm understanding the concept of how this works well enough.
Can someone please explain the expected behavior for these conditions? FWIW,
these conditions are set at design-time and not through custom actions, so i
don't think they are in the wrong spot in the sequence.


Any help on this would be much appreciated.
-------------------
-rb

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 28 July 2005 - 14:08

I'd try to avoid this, it looks weak. Also I'm not sure if "feature states" includes "feature action states" or only the current installed state of the feature.

rbrinda

rbrinda
  • Full Members
  • 65 posts

Posted 28 July 2005 - 18:02

Thanks, Stefan. Is there any other way to do something similar like this? Here's what i'm trying to do in my project:

I want to install some components (around 60 components are there that contain only registry entries) from Feature1 but only when Feature2 is removed using Modify option from Add/Remove Programs. And if Feature2 is installed back again
from Add/Remove programs, i want these components in Feature1 to get
re-evaluated and uninstalled. How can i achieve this? It seems like its not
possible at all to use component condition for this. I can write custom
action but these components are generated dynamically (using Installshield automation) so custom action doesn't seem like a good solution to me.

Any help on this would be greatly appreciated!

Thanks,
Brindha.

Edited by rbrinda, 28 July 2005 - 18:13.

-rb

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 28 July 2005 - 20:31

Component Conditions are evaluated during the Costing process, not after that. If the component is not transitive, it's even worse: its condition is only evaluated at install time (not during maintenance or uninstall).
Anyway you cannot use Component Conditions here. You could move the component to a hidden feature, and select/remove that feature after showing the feature tree.

rbrinda

rbrinda
  • Full Members
  • 65 posts

Posted 28 July 2005 - 21:09

Well, i thought about this, but my setup project is too big and i have components like this in several features and if i have to create a hidden feature for each one, then its going to get more complicated. I just wanted to know if there is any other easy and simple way of doing this, but looks like there is none.

Thanks for your help,

-Brindha.
-rb

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 29 July 2005 - 16:31

My sugguestion would also be to move those components to a separate feature and select/deselect it as appropriate.