0
votes

I currently have a windows product with a bootstrapper that runs 5-6 MSIs during installation. A couple of those MSIs can be upgraded out-of-band by running newer versions of those MSIs directly on the system. The bootstrapper is currently used to manage uninstalling all MSIs when the main product is removed. Is there a way to remove the bootstrapper from the uninstall logic? I'd like to find a way for an uninstall of the main product MSI to handle the removal of all the other 'children' MSIs.

For example: I have a product installer Foo.exe that runs A.msi, B.msi and C.msi during an installation. During the lifetime of the application the user upgrades B.msi to B'.msi and C.msi to C'.msi, now the user has A.msi, B'.msi, and C'.msi installed (Only A.msi shows up in ARP). How can I get the uninstall of A.msi to remove B'.msi and C'.msi as well?

2
If you would have a single package to uninstall from the main MSI then you could accomplish this by using a call like this to msiexec: "msiexec.exe /x {...<product code>...}" as a custom action at the end of the main package. However, this is not possible for multiple packages as the uninstall process would start simulatenously, and as you already probably know, multiple install/uninstall process are not allowed by Windows Installer. Unless you plan using chained packages (requires W.I. 4.5 installed for the users), I see no other option.Bogdan Mitrache

2 Answers

0
votes

You should be able to uninstall the old products by authoring a major upgrade using the Upgrade table. Maybe check out http://www.appdeploy.com/tips/detail.asp?id=106 and http://msdn.microsoft.com/en-us/library/windows/desktop/aa372374(v=vs.85).aspx .

0
votes

One possible way is to have A.msi install an Uninstaller.msi. The Uninstaller.msi is basically an empty msi with Upgrade table entries for the upgrade codes for A.msi, B.msi, and C.msi. The Uninstaller.msi also has the PublishProduct standard action condition set to '0' so that it will never run. Then, A.msi manually hooks up the Uninstaller.msi to the product A ARP entry. When the Uninstaller.msi is run it executes FindRelatedProducts, RemoveExistingProducts (removing all 3 msis), and finishes without registering itself as 'installed' by windows. This gets the job done in a single, rollback-able transaction. The only trick is figuring out how to get Uninstaller.msi off the system when all is said and done...