View Full Version : How to remove Installer\Products registry key ?

11-19-2007, 06:43 AM
How can i delete automatically on uninstall registry keys from HKEY_CLASSES_ROOT\Installer\Products left over when i uninstall my product? I use an InstallScript project but i cannot figure it out why those registry entries are not deleted on uninstall. The problem is that i cannot delete it manually, installshield create every time i install my product a registry key with a random guid under HKEY_CLASSES_ROOT\Installer\Products.
It create the registry keys under HKEY_CLASSES_ROOT\Installer\Products but never uninstall them.
Does anyone have an idea on how to automatically delete created registry keys on uninstall ?

11-19-2007, 12:16 PM
Registry entries under HKCR\Installer\* should never be modified or deleted except through the Windows Installer API. Attempting to modify the information in these keys can break Windows Installer on the target machine causing any MSI based installations to stop functioning and is therefore not supported. The registry keys contain private, undocumented registration information maintained by the Windows Installer service (not InstallShield) for Windows Installer packages installed on the machine. Please see the following:

Rule 21: Avoid Using Configuration Data You Don’t Own
As part of the initial design for the Installer, the consistency of installations was achieved via Microsoft taking ownership of the code for the install engine. This includes the location and format of all configuration data. This data is managed by the Installer and direct access by users or applications is discouraged; in fact some of the data is encoded to make it very difficult to manipulate manually.

You should not try to peek directly into Windows Installer configuration information. Instead, use the Windows Installer API to get the information you need. Accessing the data this way ensures that your package or application will continue to work even if the underlying configuration data changes location or format.
Tao of the Windows Installer, Part 2 - http://blogs.msdn.com/windows_installer_team/archive/2006/05/12/595950.aspx

Neither InstallShield nor the InstallScript engine will ever attempt to write any information to this registry location.

11-20-2007, 03:04 AM
Thank you for your response but i think you misunderstood the question. Why would i not delete those keys created if there are not used anymore by any application after uninstall ? Keys are created when installing my product, if I uninstall my product those keys are useless.More, they cause in time an unsual problem. After i uninstall the product hundreds of times, in control panel appear many many entries with my product that cannot be deleted. That is because of that registry entries left over by installshield.
This is without question a bug , problem whatever you may call it in Installshield. I don't care if windows installer or Installshield add those registry entries, what's added with my product must be uninstalled with my product.
I solved the problem with a script i've created, but this should be solved from installshield.
There are many other bugs/design problems even in is2008, to be honest i'm sick of it, every time i want to do a simple , normal task for every installer like changing file version or copyright i have to do a script or a batch file.

11-21-2007, 09:47 AM
It sounds like the upgrade code was changed between releases. That would explain the multiple entries in the Add/Remove Programs applet.

11-22-2007, 04:13 AM
How can upgrade code be changed between realeases ? From where i can change upgrade code ? I see no option of changing upgrade code.