0
votes

I have created a Wix Burn app that I am installing two MSI's with. Works great.

  1. The MSI files install properly
  2. The Wix Burn app registers with ARP.
  3. The MSI files do not register with ARP
  4. I can do Major Upgrades
  5. I can install and uninstall manually with a local copy of the Wix Burn app
  6. I can programmatically execute the Wix Burn app to uninstall (using /x)

The Problem:

I know two way to uninstall using a Wix Burn app:

  1. Click on the Uninstall button in ARP (requires user involvement)
  2. Launch a copy of the Wix Burn app that installed the product

I see in the Wix Burn log that Windows caches my Wix Burn app install in much the same way that MSIEXEC will cache MSI files. Is there a way to programmatically ask Windows or MSI to use the cached version of the Wix Burn app to do the uninstall?

A Possibility:

Presumably I could use MsiGetProductInfo() to get a path to the cached Wix Burn app. To do that, however, I need my app's Product Code. However, Product Codes are not attributes of elements in Wix so I am not seeing how to get a Product Code for a Burn package.

1

1 Answers

0
votes

You might be able to solve this by iterating through the Uninstall registry entries. The process is:

  1. Open HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall.
  2. Iterate through the sub-keys searching for an entry where the Publisher and DisplayName matches your product.
  3. If you find an entry, read the value of QuietUninstallString and run that as a command. For a WIX burn installer this is typically in the form C:\ProgramData\Package Cache\{GUID}\SetupProgram.exe /uninstall /quiet.

If you are using a 64 bit operating system you will also need to search HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall.