cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Snoopstah
Level 7

Uninstall removes entire registry key

When deploying my app, I potentially create a registry key:
HKLM\SOFTWARE\[Manufacturer]
I then create a sub key [ProductName]
And then finally a whole bunch of string values with data.

Another product from our sister company may also use the [Manufactruer] key and may place any sub keys and values there.

If I uninstall my product first, it is removing the entire [Manufacturer] key, including any subkeys that the sister company may have installed.

I am using an Installscript MIS project.
I have tried creating my keys via InstallScript and by Registery IDE area. I have the same result no matter which path I go down. When using the IDE, I did make sure the component was shared but that did not help.

How can I prevent my uninstall removing the key if another product is still lookign at the parent key.
Labels (1)
3 Replies
GetExp
Level 6

Have you written any custom action to delete the registry values? If so before deleting the registry keys just check whether it has any other keys under that. You can use the InstallScript function RegDBQueryKey for this purpose.
KathyMorey
Level 10

Unfortunately, InstallScript MSI projects will delete registry keys they created regardless of whether there are other keys subsequently added. What I've found effective is to create the keys in script, wrapped in Disable(LOGGING)/ Enable(LOGGING) functions. If the creation of the keys isn't logged, they won't be removed.

Of course, they'll be left behind even if they are empty, but I consider that the lesser of two evils.
Snoopstah
Level 7

Disable(LOGGING)/ Enable(LOGGING) functions fixed the problem. Thankyou.