sbeckett
Posts: 35
Joined: Thu Aug 25, 2005 12:12 am

component installation dependent on other component install

In the simplest case, I'd like to have two components.

Component1 installs if the conditional evaluates to true, and Component2 installs only if Component1 won't be installed.

So, if I want to know, on first install, whether or not Component1 will be installed, and if not, install Component2, how do I set that up?

I could do this by setting up the conditionals so that one is the logical inverse of the other, but that doesn't account for both evaluating to null and it doesn't extend beyond two components.

If I want to do something like (in pseudocode):

if (ENVVAR1 = true)
then install (Component1)
else if (ENVVAR2 = true)
then install (Component2)
else
install (Component3)
end if

How can I set up those conditional statements?

I've tried setting up component1 and then having component2 be conditioned on:

$Component1 = 2

but that apparently evaluates to null or false on first install.

When I try to tie Component2 to a component action of INSTALLSTATE_ABSENT or INSTALLSTATE_LOCAL for Component1, it always evaluates to false or null on first install.

When I tie Component2 to a component state of INSTALLSTATE_ABSENT for Component1, it always evaluates to true on first install.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

I believe that this post is related to other one so please take a look here:
http://www.advancedinstaller.com/forums ... php?t=1315

Regards,
Gigi
________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”