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
- :
- REGDBDELETEVALUE issue
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 10, 2010
11:08 PM
REGDBDELETEVALUE issue
I am facing the below issue related to the REGDBDELETEVALUE function. For me this issue occurs under the below scenario:
While Installation:
1. Create the registry key thru REGDBDREATEKEY let say "testkey".
2. Create a value inside that key thru REGDBSETKEYVALUEEX let say "testvalue".
3. Installation has been finished now.
4. Now manually create a registry value let say "testvaluemanually" inside the same key "testkey".
5. While Uninstallation, i am calling the REGDBDELETEVALUE function inside the ONMAINTUIAFTER event for "testvalue". But this time it is deleting the complete "testkey" key. So, "testvaluemanually" is also getting removed.
Expectation: Only the "testvalue" should be removed. "testvaluemanually" should be retained.
PLease help if some one knows the resolution.
While Installation:
1. Create the registry key thru REGDBDREATEKEY let say "testkey".
2. Create a value inside that key thru REGDBSETKEYVALUEEX let say "testvalue".
3. Installation has been finished now.
4. Now manually create a registry value let say "testvaluemanually" inside the same key "testkey".
5. While Uninstallation, i am calling the REGDBDELETEVALUE function inside the ONMAINTUIAFTER event for "testvalue". But this time it is deleting the complete "testkey" key. So, "testvaluemanually" is also getting removed.
Expectation: Only the "testvalue" should be removed. "testvaluemanually" should be retained.
PLease help if some one knows the resolution.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 11, 2010
03:58 AM
Got the answer from the InstallShield Help.
If the key you are creating with RegDBCreateKeyEx already exists and you have not disabled logging, the key—which other applications use—will be logged for uninstallation. During an uninstallation, the key will be uninstalled, causing problems for those applications that use the key. To avoid this problem, test for the existence of the key using RegDBKeyExist before creating it. If the key already exists, use RegDBCreateKeyEx to create a subkey unique to your application. Then, when uninstallation takes place, only the subkey will be deleted. If you do not wish to test for the existence of the key first, you can use the Disable function to disable logging while you create the key. Enable logging after the key is created. Remember, however, that the key will not be uninstalled with your application.
If the key you are creating with RegDBCreateKeyEx already exists and you have not disabled logging, the key—which other applications use—will be logged for uninstallation. During an uninstallation, the key will be uninstalled, causing problems for those applications that use the key. To avoid this problem, test for the existence of the key using RegDBKeyExist before creating it. If the key already exists, use RegDBCreateKeyEx to create a subkey unique to your application. Then, when uninstallation takes place, only the subkey will be deleted. If you do not wish to test for the existence of the key first, you can use the Disable function to disable logging while you create the key. Enable logging after the key is created. Remember, however, that the key will not be uninstalled with your application.
