Question

I need to achieve the following: The uninstallation of an MSI should present a user dialog based on which Windows Installer knows how exactly to remove the software (in this case: The user must choose whether or not to remove databases as well).

While running, the uninstall process will also trigger custom actions. All of these actions need administrative privileges.

So I need to get "Program and Features" to present either full UI on "Remove" or the authenticate for administrative privileges dialog when hitting "Change" and then remove.

How do I do this?

Was it helpful?

Solution

For reference:

Add and Remove Programs (ARP), resp. Programs and Features (on Vista+), only shows Basic UI on Remove. Full UI is required to show dialogs. Result: No user interaction possible here.

Solution:

If there is no other way than showing dialogs on removal, Remove needs to be disabled and the removal process must be triggered through the Change option which will show Full UI.

Additional Info:

If there are custom actions involved requiring elevated privileges, they need to be configured as Deferred in System Context. This will make the setup elevate privileges on entering the execution sequence, thus showing the UAC dialog demanding administrative privileges.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top