cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Darain
Level 6

function AddFolderIcon() problem

In my script of a InstallScript MSI project, I have used the AddFolderIcon() function to create shortcuts at the end of the setup steps when a user optionally, using checkboxes, checked the boxes to agree to create the shortcuts. Naturally, I have used the DeleteFolderIcon() function to remove the shortcuts during uninstall. All is good. But then for other testing purposes, I commented out the DeleteFolderIcon() functions and accidentally found that the shortcuts were still removed during uninstall. I checked a few times that I didn't have any DeleteFolderIcon() functions left in other places.

So the question is, is there a built-in process that InstallShield can always remove shortcuts they have created, like those I have created in IDE settings, so that the DeleteFolderIcon() function could be obsolete?
Labels (1)
0 Kudos
(3) Replies
Darain
Level 6

So, this is true! InstallShield behaves the same to the RegDBSetKeyValueEx() function as well.

If I use RegDBSetKeyValueEx() to create an item under a certain Registry key, it automatically deletes that item during uninstall. Even I just use RegDBSetKeyValueEx() to modify an existing Registry Key item, it would delete the item during uninstall. That is definitely not a desired behavior. I tested on two other computers and they all had the same result.

Is it just me or is it a InstallShield bug?
0 Kudos
RobertDickau
Flexera Alumni

I believe that's expected behavior; if you select Tools > InstallScript > Log File Viewer, you'll see the changes made to your system by InstallScript and InstallScript MSI projects that are logged for InstallScript uninstallation (you won't see the changes made by MSI).

You can temporarily turn off InstallScript uninstallation logging by placing commands between Disable(LOGGING) and Enable(LOGGING).
0 Kudos
Darain
Level 6

Well, for things that I created during install, this behavior comes in handy, as long as I know it worked that way. However, I think it is not documented.

But for a Registry key item that I only modified, should it not revert it back to the original rather then delete the item?

Thanks for the confirmation! I'll try the Disable(LOGGING) and Enable(LOGGING) as a work around in the latter case.
0 Kudos