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!

I've also just read something about the CopyFile Element in Wix but not sure
if this is the right way forward. I did think about using the Duplicate File
table in the msi but again not sure if this is the right way to go!
I will keep testing and let you know how I go

Any help would be great! Thanks in advance,
Mark
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to