Component Condition evaluation - Please help!!

R

rbrinda

Hi,

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.

Thanks,
Brindha.
 
A

Angele Karlheinz

Hi,

the feature state in your example will check the status on the PC not in
your installation

--
Angele IT+Bau Dienstleistungen
Tulpenstraße 24

88477 Schwendi

MSI Schulung für Wise und InstallShield
MSI Consulting
www.angele-net.de
 
R

rbrinda

I tried using feature action too as the condition (i.e., !Feature2 <> 3) and
that still doesn't work. Also, using &Feature2 <> 3 doesn't work even during
adding/removing features from Add/Remove Programs.

-Brindha.
 
A

Angele Karlheinz

hi,

try for the first

!Feature2 = 2

for the second

&Feature2 = 3 And !Feature2 = 3

--
Angele IT+Bau Dienstleistungen
Tulpenstraße 24

88477 Schwendi

MSI Schulung für Wise und InstallShield
MSI Consulting
www.angele-net.de
 
R

rbrinda

Thanks for the response. I tried this but didn't work. Actually, i want to
install some components in Feature1 when a particular feature, say Feature2
is removed from Add/Remove Programs. And if Feature2 is installed back again
from add/remove programs, these components in Feature1 should 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 there are around 60 components like this and these components are
generated dynamically so custom action doesn't seem like a good solution.

Thanks,
Brindha.
 
A

Angele Karlheinz

Hi,

when you make the conditions and it works! (have you test the value of the
conditions) What is the next step?
Do you set the installlevel from the feature 1 to a value lower then
default?


--
Angele IT+Bau Dienstleistungen
Tulpenstraße 24

88477 Schwendi

MSI Schulung für Wise und InstallShield
MSI Consulting
www.angele-net.de
 
R

rbrinda

I'm sorry, i don't understand your question. The conditions does not work
for me. I've tried this in a separate test project without dynamically
generating the components. This is what i did in the test project:

Feature1 (invisible)
-comp1 (condition: !Feature2 = 2; Transitive = yes)
Feature2 (visible from custom setup dialog)
-comp2 (has a dummy file)
Feature3 (visible from custom setup dialog)
- comp3 (has a dummy file)

In ReadyToInstall dialog's InstallNow control, i added an event "Reinstall |
Feature1 | _IsMaintenance="Change".

With this event, i assume this feature will get reinstalled (and thus the
component condition will also get re-evaluated) if you click Modify from
Add/Remove Programs.

Is this correct or am i still missing something? Any help on this will be
greatly appreciated.

Thanks,
Brindha.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top