View Full Version : How to prevent auto uninstall?

05-09-2006, 11:54 AM
My installation needs to be able to install multiple instances of the same program into different directories on the same machine. I can't figure out how to tell MSI to not uninstall the program first on subsequent runs of the install program.

I suspect this is something simple I just don't see. Any ideas?

05-09-2006, 02:47 PM
For MSI, it's (alas) not that simple. You might look in the MSI and InstallShield help libraries for information about "multiple instance installations", or disable the uninstallation completely by conditioning out the RegisterProduct, RegisterUser, PublishProduct, and PublishFeatures actions...

05-10-2006, 07:47 AM
Ugh. Thanks for the leads! I'm sure I'll be back with more on this. :)

05-16-2006, 03:16 PM
Okay, I've done some self-edumacatin on this whole multiple instances situation.

I see where it is possible to change or update a ProductCode prior to building the installation files; is there a way to generate it when the customer runs the MSI program itself? I have no logical or business restriction on installing as many product codes as I need to get the multiple instances working.

Removing the registration of the products and features works, but the ability to uninstall is also a requirement.

Alternatively, is there a way to let the user install a component multiple times. I'm thinking if I can push the installer into a repair/patch mode (thus avoiding the ProductCode issue) could already installed components be offered again, and installed again with different parameters and different directories?

I think I will trying allowing the product to register (thus allowing whole product uninstall), but turning off the feature registration (hopefully allowing multiple feature instances).

A lot of this is me thinking out loud, but hoping that someone can benefit from it and/or share a tidbit or two.

Christopher Painter
05-16-2006, 03:27 PM
MSI just isn't built for this use case. The examples where MSI does do this is MSDE 2000 SP3a where they share a single CAB file across multiple MSI's that are basically the same except they have been transformed to support a finite # of instances.

For this functionality you are better off to abandon MSI and go with a pure InstallScript project.

05-17-2006, 06:56 AM
Yeah. I'm armed with enough information now that I can present the limitations to my customer and let them decide what functionality they want to sacrifice. Either give up the MSI requirement, give up multiple installs on the same box, or give up the ability to uninstall easily.

05-18-2006, 11:18 AM
Whilst I wait for responses from the customer...

I wonder if it would be possible to have a vbScript action that copies all the app files and recreates the registry settings for each instance of the program I need.

Customer could then specify on a dialog which instances he wants to create and I would programmatically clone the first one.