0

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?

RBT
  • 24,161
  • 21
  • 159
  • 240
  • The installer has written already to it's own folder (directory), where it has the app executable. Try to figure out where this folder is (maybe from project scheme). If the installer found same exec in path it will throw that error. Not sure if incrementing exec version allows to pass over this. You can make installer to search if path exists, kill process, remove (or call uninstall ) then write there. Those are steps easy to do. – ares777 Feb 03 '17 at 07:10

3 Answers3

4

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.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
Nikolay
  • 10,752
  • 2
  • 23
  • 51
  • After removing the registry entry I've mentioned in my post I was not seeing the program name at all in the "Add/Remove programs" tool. But, your `msiexec /x {Product Code}` command did the trick for me. It cleaned up everything from the system for a fresh install to begin without issues. Awesome. Thanks a ton! – RBT Feb 05 '17 at 03:46
  • WOW, thanks a million. **Fixit tool from Microsoft** saved only 2 hours of my working day as I had already spent remaining of the day trying to fix this issue. – ashubuntu Apr 04 '19 at 10:27
0

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.

Michael Urman
  • 15,737
  • 2
  • 28
  • 44
  • Hey Michael! The package I was trying to install was a full product installer instead of some small upgrade/patch. I tried the command you suggested after which the installer wizard showed up. Wizard showed me only welcome and finish screens without showing me intermediate steps where user is suppose to provide input. After wizard got over I still didn't see the missing entry in add/remove programs window. – RBT Feb 05 '17 at 03:56
0

@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.

RBT
  • 24,161
  • 21
  • 159
  • 240
  • 1
    My bad. Looks like I forgot to give the reference citation link. I'll update it. Thanks for the review feedback. Appreciate it. – RBT Feb 05 '17 at 07:34
  • 1
    Manually removing registry entries owned by Windows Installer is asking for difficulties. While it's okay to consider this on a dev/test box, avoid doing this in production or on end user machines. Since it's hard to fully clean things this way, prefer to use a VM that you can revert to a known good state. – Michael Urman Feb 05 '17 at 15:22
  • 1
    Simply changing the ProductCode (and PackageCode) of the setup should allow it to install fine. Hacking the registry can be a disaster because all the other install data relating to the product (upggradecode and component ids) is still in the registry, as Michael U. says. – PhilDW Feb 06 '17 at 17:59