cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hype261
Level 3

Add/Remove Programs uninstall Chained MSI

I am currently working on a Basic MSI installation project. This was all working correctly until we decided to add a chained MSI. The product installs correctly, but fails when trying to uninstall from the Add/Remove programs on Win 7 64 bit. I can uninstall the program by running the setup.exe, but when uninstalling it from Add/Remove programs it reinstalls the product at the end of the uninstall. From looking through the msi log it is telling me that the chained msi is failing because it doesn't have administrative privalages, but I have set Administrative privalages to Yes on both the main msi and the chained msi. Any ideas?
Labels (1)
0 Kudos
(3) Replies
hype261
Level 3

I finally got the uninstall to work correctly. For anybody who has a similar issue you cannot have the chained msi UI set to none if you are planning to uninstall the chained msi with the main msi. Setting the chained msi UI to none prevents a UAC prompt from coming up so it fails... I turned the UI to basic and it succeeded.
0 Kudos
deramor
Level 6

Also for anyone else who needs to know, using chained MSIs are prone to this issue if you decide to remove only the chained package and not your entire package. This is due to how UAC and Windows Installer work together.

Let me explain. When a setup installs it usually has admin rights. This rights token will be passed to any chained MSIs you install as well. If later, you want to modify the features and, in so doing, remove a feature that also removes a chained MSI, the setup will not have an admin token to pass to the chained MSI. This is because Windows Installer and UAC allows any user to modify the setup without admin rights but not remove it completely. However since you actually are completely removing the chained package it will fail because it does not have rights to be removed.

I have run into this trying to make an installer that bundles many products together while at the same time allowing for customization of features (in this case complete products) through the Modify dialog. I did not want to write something which requested an admin rights token so I moved away from this.
0 Kudos
ing_george
Level 2

hype261 wrote:
I finally got the uninstall to work correctly. For anybody who has a similar issue you cannot have the chained msi UI set to none if you are planning to uninstall the chained msi with the main msi. Setting the chained msi UI to none prevents a UAC prompt from coming up so it fails... I turned the UI to basic and it succeeded.


This was really helpful to me. Thanks.

I don't like the unexpected behaviour of the dismissed UAC dialog when the UI is set to none. I also don't like it that the installer shows multiple dialogs with the basic UI, but at least it works.
All this took me 1,5 day (I tried the nested msi way, but that is definitely a no go).
0 Kudos