View Full Version : Registry entires not removed on major upgrade

07-11-2006, 10:50 PM
My major release software is installed.
It adds an entry to the registry (via the Regsitry Veiw) that looks like this


So for the first release I have version 3.3.1000. The following is added to the registry :

The we release update 2 version 3.3.2000 (a service pack release). The following is ADDED to the registry :

The we release update 3 version 3.3.3000 (a service pack release). The following is ADDED to the registry :

Upon uninstalling Update 3, I noticed only the verison 3.3.3000 is removed from the registry. All other entries remain.

When performing a MAJOR upgrade to 3.4.0000, only the previous registry entry entry of 3.3.3000 is removed. The older entries of 3.3.1000 and 3.3.2000 remain. The new entry of 3.4.0000 is added to the end.

Why are the entries not being removed upon uninstallation or major upgrade ?

I realise it is very easy to write a CA to remove these "dead" registry entries, but it is rather tiresome to be doing this with each SP release.

07-11-2006, 11:12 PM
Are these components across versions sharing the same component GUID? You will want to take a look at installation log (with /l*v switch) to determine the cause.

07-11-2006, 11:57 PM
The registry entires share the the same component.

The Registry view looks the same for each release as attached in the picture below.

I have attached the installation log file. It confirms only the 3.3.3000 values are removed during uninstallation. Not sure what else to look for in there...

07-12-2006, 09:44 PM
RemoveExistingProducts action (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/removeexistingproducts_action.asp) is scheduled between the InstallValidate action and the InstallInitialize action, that's why 3.3.3000 gets removed when (major) upgrading to 3.4.0000, even though the component GUID stays the same.

Now reading closely to your initial post, I realized that major upgrade was not used going from 3.3.1000 to 3.3.2000 to . I mistook that major upgrade was used all along.

If I understand your installations correctly, major upgrade will only remove the registry entry (3.3.3000) created by the latest installed update, and not registry entries (3.3.1000 and 3.3.2000) before that. The behavior you are experiencing is unfortunately expected.

Since the updates are already in the wild, you will probably have to perform extra tasks during major upgrade in order to remove these orphaned registry entries.

07-12-2006, 10:01 PM
Thankyou for clearing that up. At least it is expected behaviour and I have not done anything wrong...

So to confirm, if there have been several minor upgrades, when it comes time to do my major upgrade I will need to write CA's to remove all those previous registry entries ?

07-12-2006, 10:10 PM
Yes. Or RemoveRegistry table (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/removeregistry_table.asp) if it works for you.