WiX/MSI installer successfully runs for uninstalling an app but the app has not been uninstalled
Asked Answered
D

1

1

I created a Wix Installer for my Visual Studio 2017 project by using this Wix Toolset Visual Studio 2017 Extension from its original author Rob Mensching. The installer successfully installed the app but when I run the installer again to uninstall the app, the installer, as expected, first shows the option of either repairing or uninstalling the app.

When I choose Uninstall option it successfully runs indicating it's uninstalling and finally shows the Finish button, but when I go to my Windows 10 menu the app is still there and still works as usual - that clearly means it was not uninstalled.

I even re-started the computer to see if that makes any difference but the app is still there and working as usual. Question: What could be a cause of it happening - and what is the remedy?

Note: I'm using the latest version 3.11 of Wix

UPDATE

It's a VSTO add-in. Now it is working as follows: I manually uninstalled it from Windows' Add\Remove program and then installed it again using Wix/MSI. And then when I uninstalled again using Wix/MSI it successfully uninstalled it. Question: Why initially it was not uninstalling when using Wix/MSI?

Dextroamphetamine answered 9/2, 2019 at 3:42 Comment(8)
A couple of updates below.Jacobsen
Did you find multiple entries in Add / Remove Programs that you all uninstalled?Jacobsen
@SteinÅsmul No, there was only one entry.Dextroamphetamine
I guess it is possible that the old version installed "per-user" and the new version installed "per-machine". What does it say in the Package element for the InstallScope attribute? Check old and new source if you have them.Jacobsen
For clarity, the WiX Toolset is one of several builders of MSI packages. Windows Installer (e.g., msiexec) performs operations with such packages. Windows Programs and Features (fka Add/Remove Programs) is a registry for any type of installation. For Windows Installer installations, it just lists commands for msiexec operations on a package. So, Windows Installer should behave the same no matter where it is invoked from or which tool build the package; The only differences would be what the arguments are for the operations.Drawback
@SteinÅsmul The InstallScope` attribute the Package element is perMachine. I think the issue does seem to be related to getting various versions installed at different times as you mentioned in your response and the comments. I was experimenting for the first time using WiX installer in my VS2017 project sometimes with and sometimes without using Wix Toolset Visual Studio 2017 Extension - that probably resulted in the issue. I'll mark your response as an answer as it really helped.Dextroamphetamine
OK, do you have clean virtuals to test on? Crucial for deployment, but I guess that is obvious. Can be a lot of work to set up, especially when you need specific versions of Office.Jacobsen
@SteinÅsmul Yes , I do. I've a Windows 10 Pro virtual machine with required components installed. So, that should help.Dextroamphetamine
E
2

Duplicates: You have probably installed the product several times (at least two) whilst working on the package. This happens all the time, particularly if you use an automatically generated product code and haven't set up a major upgrade construct yet or the upgrade guid is missing or worse yet you set it to auto-generate. Upgrade codes should remain stable for "families" of products. Essentially all related editions that you don't want to install side-by-side.

So with duplicated installations, the uninstall of the product only removes the latest installation, leaving the files in place since the reference count is not zero as there are other installations. The solution is to keep a stable upgrade guid and set up a major upgrade construct. Before that uninstall all stray copies.

Maybe try this procedure:

  • Windows Key + tap R
  • Type appwiz.cpl and press Enter

Look for duplicate copies of the product in the list and uninstall them.


Hidden Products: It is also possible that some copies could be hidden from the above list.

Eggshaped answered 9/2, 2019 at 5:19 Comment(1)
I've just added an UPDATE - in case you have any comments.Dextroamphetamine

© 2022 - 2024 — McMap. All rights reserved.