Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 2


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.


if (RegDBGetItem(REGDB_UNINSTALL_NAME, szShortcutName) < 0) then
MessageBox("Unable to get shortcut name", SEVERE);
DeleteFolderIcon(FOLDER_DESKTOP, szShortcutName);

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.
Labels (1)
0 Kudos
(1) Reply
Level 8

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.
0 Kudos