Windows Installer: A wrong information is displayed in the Add/Remove programs applet

Some time ago I was asked by the developer: what can be a cause when we see an old information in the Control Panel applet for our application? It can be a wrong description, old build version and etc. Well, it depends...

First, I took a look at the Add/Remove Programs tool displays installed programs incorrectly article. The list of OS is pretty old, so I don't think that you find the real cause there.

Then I started looking at the source code. Due to the fact that Windows Installer projects were removed from the list of Visual Studio projects, we use WiX toolset for creating installers to deploy the software on other machines. Didn't find anything strange in the XML markup also, so decided to look at the .MSI file itself. The Orca.exe utility is a great help in such cases. See How to use the Orca database editor to edit Windows Installer files for more information. But there I didn't find any possible cause also. All properties were set according to the source files.

Well, what can be a reason then?


I started learning the way how the Control Panel applet (Add/Remove Programs) gathers the required information about installed applications. Typically the picture looks like the one shown below:



The picture describes an algorithm how the required information is gathered by the OS to list the installed application from a high perspective. I omitted low-level details.





On a x64 based systems the OS looks at the first registry hive and if the application with a specified ID is found, the information for that ID is ignored then when searching in another hive (Wow6432Node). Even if the application is listed there, the information is ignored. The priority is higher for the first hive.

After I removed old entries from both hives and installed the application anew I don't see the issue any longer - the version numbers are displayed correctly.

When you create an installer using the WiX toolset and play with a bitness of the installer don't forget to delete old registry keys that Windows Installer leaves after uninstalling the software. It will save you a great amount of time!

Popular

Microsoft Word: How to get a selected word when you do a right click

A bad sample from the VSTO team (Microsoft)

What does 'Embargo' mean for IT professionals? - Part I