/build/static/layout/Breadcrumb_cap_w.png

Avoid shortcut folder removal on msi uninstallation

Hello

I'm working in a packaging team using Installshield 2013, within a company where all application shortcuts are regrouped in one unique folder.

When we need through a .mst file to move a shortcut to this specific folder, in the shortcut management of Installshield, we need to recreate the folder into Shortcuts\TaskBar\Start Menu\Programs Menu\  and then create the shorcut inside this specific folder.
However, during the msi. uninstallation, this shortcut folder is deleted if this folder is found empty since the msi considers that he has created the folder through its installation.

On wise, there was a specific option to specify that a shortcut folder was already existing on the machine. Do you know if we have a way to do the same on Installshield?

Thanks !


1 Comment   [ + ] Show comment
  • Thanks for your reply, but i can't find this option on Installshield 2013. Are you using Installshield 2014? - JeremieBernard 9 years ago

Answers (4)

Answer Summary:
Posted by: Badger 9 years ago
Red Belt
2

Create the DIR structure in the ISM template (or and MST) so it can be used (or not used) for each product, and resulting MSI.

In the RemoveFile table make sure you are not forcing the removal of the folder. It should remove the shortcuts, and if the folder is empty, remove the folder.

If the folder is NOT empty it (and the existing shortcuts remain) will remain.
If the folder IS empty, it will be removed, and the next MSI that comes along will create it nicely??

Having just re read your question, that is exactly what I have described. So quite normal activity.

Heres the crux of it. To get past the ICE64 validation, InstallShield will be populating the RemoveFile table. As DeliveryBoy has mentioned, take out that entry and you will be fine.

This is all to do with the RemoveFileTable...


Posted by: jagadeish 9 years ago
Red Belt
1
You are checking only your own msi package on a clean machine and saying that it is removing the shortcut folder when it becomes empty at the time of uninstall. obviously...This how it should be.. It should not be an issue at all.

You install some other package (which is delivering shortcut to the same folder) that was created by your team first and then install your package on top of it..
now, if you uninstall your package alone,  your shortcut folder will not be removed, your shortcut alone will be removed even if you have RemoveFile table entry for the shortcut's folder..
Windows installer knows that it is not an empty folder, so it will not remove that folder.. 

Posted by: anonymous_9363 9 years ago
Red Belt
0
Ensure that the component that creates the folder does only that - create the folder - and then mark that component as permanent.

Comments:
  • Thanks for the tip ! But that's where i've a tricky behavior. If i create a component that stores the shortcut folder, and marked as permanent, as soon as i assign a shortcut within it, it is still removed during the msi removal in spite of the permanent status of the component that stores the folder.
    WIthout the shorcut, it remains as it should after the removal. - JeremieBernard 9 years ago
Posted by: deliveryboy 9 years ago
Orange Senior Belt
0
Take a look in the Files view of the component that contains the shortcut, I see this listed: ***Remove [DELETE_ME] if empty ***

If I delete this and rebuild and installl/remove then the empty shortcuts folder does not get deleted.

Comments:
  • Thanks for your reply, but i can't find this option on Installshield 2013. Are you using Installshield 2014? - JeremieBernard 9 years ago
    • Microsoft used to create a hidden, zero byte file called something like mscreate.dir in folders to avoid them being deleted when empty. Just add a hidden zero byte file as a permanent component to go in the shortcuts folder and that should solve your problem. - EdT 9 years ago
    • Yes 2014 and a new project, not opening an existing package - deliveryboy 9 years ago
      • Thaks a lot for all your answers. On Installshield 2013, this option does not exist at all, but removing the entry of the shortcut in RemoveFile helps to keep the shortcut folder after the application removal, and delete the shortcut itself. Exactly what i needed. Thanks - JeremieBernard 9 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ