WIX: installer not removing properties on uninstall

312 views Asked by At

I used a wix generated msi file to install a software. Installing the software works fine, but sometimes there are some problems during uninstall.

All the files in "Programm Files" are removed as expected but after the uninstall, some data still remains on the system:

  • the app entry in "Programs and Features"
  • the installer in "C:\Windows\Installer\"
  • (and some registry entries which point to the two things above)

The problem is: as long as those data is on the system, it's not possible to reinstall the same version of the software. The installer shows the "Repair / Remove" action. None of them are working anymore.

But why does the installer not remove those files/entries? What could be the problem?

Just some notes: when performing a MajorUpgrade, the new installer removes all the old entries. But this is not a solution. Ans yes, all those registry entries and files can be removed by hand. After that a reinstall is possbile, but this is also no solution for the users.

1

There are 1 answers

0
PhilDW On

This doesn't make much sense, primarily because installs and uninstalls are complete transactions, so that if an uninstall fails it will roll back and the entire product will still be there. It won't be a partial uninstall where some things stay and others are removed. Some things to look at are:

  1. Do a log of the uninstall with msiexec /x {productcode} /l*vx [path to log file] to see if something shows there, for example if it finished successfully.

  2. The \Windows\installer directory is full of msp, msi, mst files, so it's not clear what you mean about "the installer" being there because lots of cached installer files are there. Yours might be there too, I agree, if there is an entry in Programs and Features. That just means that there is still that product installed.

  3. It's not clear why you mention upgrades, or what the entire scenario is. However you would get to your current situation if you had two installs where one was installed over the other incorrectly. Uninstalling one could remove all the files but leave a product behind.

  4. Your system may no longer be clean if the same ProductCode has been used for multiple installs and testing, or you've attempted to clean things up with a tool like MsiZap. Start with a clean virtual machine every time, and see if you get the same issue. If this is happening on one test machine that might be scrambled due to repeated testing, then it could help to give your setup a new ProductCode and a new UpgradeCode.