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?

nam
  • 15,516
  • 23
  • 104
  • 228
  • A couple of updates below. – Stein Åsmul Feb 09 '19 at 15:38
  • Did you find multiple entries in Add / Remove Programs that you all uninstalled? – Stein Åsmul Feb 09 '19 at 19:09
  • @SteinÅsmul No, there was only one entry. – nam Feb 09 '19 at 20:28
  • 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. – Stein Åsmul Feb 10 '19 at 00:04
  • 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. – Tom Blodget Feb 10 '19 at 16:20
  • @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](https://marketplace.visualstudio.com/items?itemName=RobMensching.WixToolsetVisualStudio2017Extension) - that probably resulted in the issue. I'll mark your response as an `answer` as it really helped. – nam Feb 12 '19 at 20:11
  • 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. – Stein Åsmul Feb 12 '19 at 20:12
  • @SteinÅsmul Yes , I do. I've a `Windows 10 Pro` virtual machine with required components installed. So, that should help. – nam Feb 12 '19 at 21:44

1 Answers1

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.

Stein Åsmul
  • 34,628
  • 23
  • 78
  • 140