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
- :
- REGDB_UNINSTALL_NAME error
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
Jul 08, 2011
01:00 PM
REGDB_UNINSTALL_NAME error
I have a basic MSI project in which I am trying to manually remove a desktop icon through a custom action (because it was created via a custom action and will not delete during uninstall). I am using the following function which just returns an error when I try to get the displayName from the uninstall key in the registry. I am doing it this way because the product name is dynamically set at install time and I need to retrieve the displayName during uninstall to remove the shortcut.
RegDBSetDefaultRoot (HKEY_LOCAL_MACHINE);
if (RegDBGetItem(REGDB_UNINSTALL_NAME, szShortcutName) < 0) then
MessageBox("Unable to get shortcut name", SEVERE);
else
DeleteFolderIcon(FOLDER_DESKTOP, szShortcutName);
endif;
Any ideas on why the RegDBGetItem function is failing? I have the condition set to REMOVE="ALL" and I have tried putting the execute sequence in several different places from beginning to end.
RegDBSetDefaultRoot (HKEY_LOCAL_MACHINE);
if (RegDBGetItem(REGDB_UNINSTALL_NAME, szShortcutName) < 0) then
MessageBox("Unable to get shortcut name", SEVERE);
else
DeleteFolderIcon(FOLDER_DESKTOP, szShortcutName);
endif;
Any ideas on why the RegDBGetItem function is failing? I have the condition set to REMOVE="ALL" and I have tried putting the execute sequence in several different places from beginning to end.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jul 09, 2011
07:18 AM
I do not think your CA runs with appropriate rights. HKLM is always a high security zone.
If your install runs elevated, try using the Deferred in System Context option for your CA.
Also, make sure your icon install CA is not called in the uninstall.
If your install runs elevated, try using the Deferred in System Context option for your CA.
Also, make sure your icon install CA is not called in the uninstall.
![](/skins/images/8C9D13A71C7F7695F3262372C0172D68/responsive_peak/images/icon_anonymous_message.png)