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 !
-
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)
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...
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
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