wixburnwix4

How to use ARPEntry to detect and uninstall an ExePackage?


I'm using WiX4 to bundle several installers together using Burn. One of the installers is created using Inno Setup, and thus the uninstaller for that package is installed to the system. I can't use the typical Burn facility for uninstall as that runs the installer. The ARPentry Element appears to be made for this.

However, I can't seem to get it to work. What value should I be assigning to the required Id attribute? What is "The id of the ARP entry" referring to here? Since both the DetectCondition and UninstallArguments attributes are disallowed, I assume this Id is part of the mechanism for detecting, but I don't understand what it's looking for.

I've tried the display name that appears under the Programs and Features panel, and also the key under the HKLM\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall registry that corresponds to my installer, but the package isn't uninstalled and I see the following in the logs:

[179C:17A0][2023-09-27T12:01:16]i101: Detected package: PreReq.Setup.exe, state: Absent, cached: Yes, install registration state: Absent, cache registration state: Present
...
[179C:17A0][2023-09-27T12:01:18]i201: Planned package: PreReq.Setup.exe, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, default cache strategy: Keep, ba requested strategy: Keep, cache: No, uncache: Yes, dependency: None, expected install registration state: Absent, expected cache registration state: Absent

Solution

  • After some more debugging, it turns out that the Id is indeed the key under the uninstall registry. My mistake was in setting the Win64 attribute incorrectly, so redirection was kicking in and looking in the wrong location.