views:

104

answers:

2

Hi,

We have a bit of an odd setup, which comes from the fact we provide hosted installations of our software to our clients, and each client may be on a different version of our software and be running with a seperate database.

We also allow clients (under a different licensing scheme) to install our software locally at their premises on their own machines.

This makes building a installation package MSI (we're using WIX) for one of our apps (a .NET windows service) fairly difficult, and I have one major stumbling block.

I can't figure out how to have one installer for a version (MyApp V2.0.0) that can be installed MULTIPLE times on one machine with the following properties:

  1. Name of app in add/remove programs: "MyApp (CUSTOMERNAME)", where CUSTOMERNAME is defined during the setup as part of a GUI.

  2. Each instance of the application installed into \Program Files\Company\MyApp (CUSTOMERNAME).

  3. A service created/updated called "MyApp (CUSTOMERNAME)".

  4. Allow individual installations to be upgraded without affecting other installations AT ALL.

Basically affecting the installation of one instance should not affect any others in any way.

Does anyone have any idea how this can be achieved or if there are any other available techniques?

Thanks.

A: 

What about using MSI Transforms applied to the original MSI. One transform for each special configuration you need. The only think is that in order to install the same package in one machine you'd need to change the product GUID, and I'm not sure that's allowed with transforms. It's worth researching it though!

Nestor
+1  A: 

Refer to the Microsoft documentation on Installing Multiple Instances of Products and Patches.

Basically, you can't do this at runtime "inside" the MSI (without breaking other core functionality of Windows Installer, in which case you might as well just use a non-MSI solution such as NSIS instead)

If you want to create a truly dynamic system, where multiple instances can be defined by the end-user at runtime you'll need to create a bootstrapper that prompts the user for information, generates an MST on the fly and then launches the MSI with the required parameters. Alternatively, create the MST's yourself on a per-customer basis (it's fairly trivial to script.. check out the samples provided in the Windows SDK)

From memory there was discussion on the WiX list last month with someone trying to do this when using WiX to install multiple websites on the same server. If you can find the relevant threads there should be some more through responses than mine there :)

sascha
Excellent answer thanks Sascha, thats pretty much exactly what I was looking for. Now to find the easiest way to author an Instance Transform! :)
Kieran Benton
For mine (and others) future reference, the appropriate thread seems to be http://n2.nabble.com/Multiple-Instances-and-Component-IDs-td4152306.html#a4152306.
Kieran Benton