I'm on a windows Server 2012 box and something has got messed up. I was trying to uninstall my application from add/remove programs tool. When I tried to do it I saw below error message:

enter image description here

So I went ahead and removed following registry entry with the help of which Windows manages the list of all the installed applications in add/remove programs tool:

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{C14DB2B2-6089-4C96-A878-77BA377BABBF}]

In this specific path I was able to figure out that the C14DB2B2-6089-4C96-A878-77BA377BABBF guid hive belongs to my product with the help of DisplayName key inside it

Thereafter, I stopped seeing my application in add/remove programs tool window. So, I thought I was done.

<<Update After seeing @Nikolay's answer>>

There were two ways to encounter the error I was facing while trying to do a fresh install after this mess. I'm explaining both the routes:

  1. When I tried to install the application by running the same myapplication.msi file then it shows below screen instead when I click "Next" button on the welcome screen. It seems as if the program is still installed:

enter image description here

  1. In another mess, somehow my MSI had got renamed in the build process which started to emit a new MSI name myapplication_x.msi. When I tried to install the application by running the newly named myapplication_x.msi file then it gives me below shown error message box:

enter image description here

So overall I was not able to install a new MSI of my product and I was not seeing anything in "add/remove programs" window. It seems I'm still missing something from registry stand-point. Can someone help me to get rid of this issue either by cleaning some more registry entries or some better way if it exists to clear the traces of an installed product on a machine?

3

There are 3 answers

3
Nikolay On BEST ANSWER

Removing the entry Uninstall\{xxxxxxxxx} does not really uninstall the product. It is similar to removing a program shortcut from the desktop. This does not really remove the program.

Try clicking "Remove" instead of "Modify" button in the add/remove control panel. If there is only one button, "Modify/Remove", then you can try to remove the program from command line like this:

> msiexec /x {C14DB2B2-6089-4C96-A878-77BA377BABBF}

In the worst case scenario if you have messed up your system completely by editing registry, there may be another option: MsiZap.exe tool (deprecated, unsupported and unsafe tools to use), that can wipe out all registry entries for a specified MSI.

UPDATE: There is a new FixIt tool from Microsoft that can be tried if you have applications that won't uninstall.

1
Michael Urman On

That error indicates you are trying to install a package "related" to one that is currently on the machine without the appropriate instructions to msiexec. This package is presumably a small update or minor upgrade (although possibly not a valid one, and I would be especially skeptical about any later uninstallation problems). Typically to install such an update you need to specify

msiexec /i myapplication.msi REINSTALL=all REINSTALLMODE=vomus

Or, as Nikolay described, properly uninstall the existing package with msiexec /x {product-code} (the guid you saw in the Uninstall key of the registry is your product code).

If that doesn't work, revert your test VM to a clean state and start over.

3
RBT On

@Nikolay's answer helped me solve my problem and was a very clean approach. but in due course of solving this issue I figured out a registry key which might be of some help in case the situation on your machine is more messier. Deleting this registry key had initially helped as well to get rid of this issue. After deleting this registry key my new installer had started to work.

This registry entry is present in HKEY_CLASSES_ROOT. You will have to search the desired registry by initiating a search using your product name on HKEY_CLASSES_ROOT hive. The full path was as below:

[HKEY_CLASSES_ROOT\Installer\Products\2B2BD41C980669C48A8777AB73B7BAFB]

Note: The guid shown in the above path is not the product code but a random guid generated during product registration while running the installer.

I just mentioned this registry path in case someone finds it of some use in more messier situations like the one I fell into.