This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Uninstall deletes to many registry entries
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Mar 07, 2011
05:21 AM
Uninstall deletes to many registry entries
Installscript project
We have multiple applications and we store some setting during installation in this way:
works fine, on uninstall however, it deletes the entire 'Company Name' tree including settings made by other applications in their own sub keys.
Why? and how can we prevent this.
I'm not even sure why it deletes anything at all, reading the help on the function it mentions that it only deletes keys when they were created by RegDBCreateKeyEx
note: these projects have no other regestry entries in the installation, it only has those made by RegDBSetKeyValueEx calls.
any help to prevent deleting of the entire tree would be much apreciated
We have multiple applications and we store some setting during installation in this way:
RegDBSetDefaultRoot (HKEY_LOCAL_MACHINE);
RegDBSetKeyValueEx ( "Software\\Company Name\\"+IFX_PRODUCT_NAME, "ID", REGDB_STRING, ID, -1 );
works fine, on uninstall however, it deletes the entire 'Company Name' tree including settings made by other applications in their own sub keys.
Why? and how can we prevent this.
I'm not even sure why it deletes anything at all, reading the help on the function it mentions that it only deletes keys when they were created by RegDBCreateKeyEx
note: these projects have no other regestry entries in the installation, it only has those made by RegDBSetKeyValueEx calls.
any help to prevent deleting of the entire tree would be much apreciated
(2) Replies
‎Mar 08, 2011
07:04 AM
Some more time searching the forums showed me that this problem exists since atleast 2002. 😞
Atleast there seems to be a work arround which I'm gona test:
Disable(LOGGING) / Enable(LOGGING) arround the key codes... but now they wont be removed at all...
Would still like to ask, if there is a proper solution to this, or if this is a bug and if so when that will be fixed.
Atleast there seems to be a work arround which I'm gona test:
Disable(LOGGING) / Enable(LOGGING) arround the key codes... but now they wont be removed at all...
Would still like to ask, if there is a proper solution to this, or if this is a bug and if so when that will be fixed.
‎Mar 08, 2011
02:21 PM
The docs are unfortunately incorrect in current releases of InstallShield. RegDBSetKeyValueEx calls RegDBCreateKeyEx passing the key from the szKey parameter to create it. RegDBCreateKeyEx will always log any keys it is called with (if logging is enabled), and will mark them as 'created' if the current install was the first to create the keys passed. In this case, when the project is uninstalled, any keys marked 'created' in the log are removed.
It is possible to create this registry information through the Registry view in InstallScript projects. This currently offers an additional option to mark registry keys as shared (by right-clicking a key then selecting "Shared among several applications"). The engine will take a slightly different approach during uninstall when removing keys marked as shared to attempt to avoid the situation you are seeing (keys created with RegDBCreateKeyEx are not marked as shared).
Note that you can view all registry keys that were logged during an installation and whether they were 'created' by the install using the InstallScript Cabinet and Log File Viewer from the Tools menu in InstallShield.
It is possible to create this registry information through the Registry view in InstallScript projects. This currently offers an additional option to mark registry keys as shared (by right-clicking a key then selecting "Shared among several applications"). The engine will take a slightly different approach during uninstall when removing keys marked as shared to attempt to avoid the situation you are seeing (keys created with RegDBCreateKeyEx are not marked as shared).
Note that you can view all registry keys that were logged during an installation and whether they were 'created' by the install using the InstallScript Cabinet and Log File Viewer from the Tools menu in InstallShield.