[wix-users] Uninstallation abort on detecting the registry values

Joel Budreau joel.budreau at gmail.com
Thu Dec 14 14:24:32 PST 2017

A quick explanation of a possible solution:

You could make use of a RegistrySearch to populate a MSI Property if some
registry value exists. Then condition a type-19 (error) custom action to
execute if: Installed And [YourRegistryValue] And REMOVE~="ALL".

If you're using the wix-based bootstrapper you won't get REMOVE=ALL, but
instead will get REMOVE=Feature1,Feature2,... where all feature are listed.
In this case, you might want to replace REMOVE~="ALL" with some other
condition that only occurs during an uninstall. Maybe you have a
"MainFeature" that is always installed. In this case you could condition
off "&MainFeature=2" to signify an uninstall.

On Tue, Dec 12, 2017 at 11:26 PM, Suresh, Santhosh Vellore via wix-users <
wix-users at lists.wixtoolset.org> wrote:

> Hi all,
> I'm trying to abort an uninstallation when I find the application is
> installed in the system. I want to check if the registry value exist in the
> system registry and abort the uninstallation.
> Can you help me out with snippet of code to check if the registry value
> exist and abort the uninstallation.
> Regards,
> Santhosh
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/

More information about the wix-users mailing list