Hi, OK, firstly, I just typed this same message out 2 minutes ago and tried to submit it and received an error which meant I lost the entire message........that's really helped!! [:@]

OK, my problem is confusing - for me anyway. I'm working on a Wix install but the problem is an msi based one as far as I can see.

I am working on an Application called GLOBAL.
This Application can be installed to 3 different locations depending on certain Conditions.
The conditions involve the presence of 1 or 2 other applications, we'll call them APPX and APPY. Or the lack of their presence.
I will define the 3 different scenarios that can exist.

I am installing GLOBAL onto a machine that doesn't have APPX or APPY installed.
Neither APPX or APPY installed = GLOBAL installed to default location which I have defined as being C:\Program Files\GLOBAL.
APPX is installed = The GLOBAL files get installed to APPX's InstallDirectory which I set in a Custom Action.
APPY is installed = The GLOBAL files get installed to APPY's InstallDirectory which I set in a Custom Action.

Now, this is where my problem begins -
APPX and APPY are installed = The GLOBAL files should get installed to both InstallDirectory's.

However, the method I am using in my Custom Actions involves setting a Property.
I have defined a Property called PRODUCTDIR and set it equal to C:\Program Files\GLOBAL to begin with.
Therefore if neither APPX or APPY are installed PRODUCTDIR is unchanged and the files are installed to this location.

My Custom Action is setup to set this Property PRODUCTDIR to APPX or APPY's InstallDirectory if one of them is found and therefore changing the Install Location of GLOBAL files.
This will not work if APPX and APPY are found as the PRODUCTDIR property will only take one value and I am trying to give it two.

There is a very messy solution and that is to create 3 components for each file and set each Component to install to either GLOBAL, APPX or APPY's install directory.
I don't like this method and I think there must be another way to do it, I just can't think of it!

Any help would be great! Thanks in advance,

0 Comments   [ + ] Show Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.


I would say that the best way to go about this would be to create multiple conditional features & make use of the duplicateFile table. This will keep your install modular and you will not get too muddied up in trying to keep your logic straight...
Answered 08/28/2008 by: kiptek
Second Degree Green Belt

Please log in to comment
Answer this question or Comment on this question for clarity