I have a WiX 3.11-based bundle installer with a managed bootstrapper application.
I want to perform a cleanup action at the end of the installer, after removing a related bundle during upgrade. The cleanup action requires elevated privileges.
From what I understand, the removal of related bundles always happens at the end of the install chain, so I can't specify an ExePackage that will run after that. Is there any workaround here?
I can't run the cleanup action in the managed bootstrapper application process, since it is not elevated.
I've found some people mention that it's possible to spin up a background process from the MBA that runs as administrator. That seems messy though, since I think it would cause a second elevation prompt (the first being at the beginning of the install execute phase). But it may be my only option.
You want
ApprovedExeForElevation. It lets BAs launch elevated processes via the elevated engine process. See also WiX Burn Bundle Custom UI LaunchApprovedExe.