View Full Version : Merge module best practices - uninstall

08-01-2008, 08:49 AM
I was wondering if anyone had any insight to pass on regarding best practices for merge modules. I realize that individual key files of merge modules (and all installers) have a registry entry to keep track of reference counting to know if other applications still need it. But what about files such as sql databases which are created dynamically via sql scripts and not traditional copy of files?

Merge module X is installed with multiple product installers (ie. Product A, Product B, etc.). The merge module includes a sql database. When / how is it best to uninstall the sql database? I am assuming that creating a custom action with condition detecting if is an uninstall will not achieve desired results because that simply means that an individual product which includes the merge module is being uninstalled, but there could be others installed that still depend on the merge module's database.

08-04-2008, 07:43 AM
I've never had to do this, but if the merge module contains other components with key files, I think you can use the MSI API to check to see what products are using those components, and then uninstall the database accordingly.