I have a file that is installed by two independant setup project in the [CommonFilesFolder]. I would like to create a shortcut to this file in the two setup project.
In each project I've created a component marked as shared that install the same file in the same location. Each component has it's own shortcut.
Everything is fine at installation time : two shortcut.
If I uninstall one of the products, the component is not removed. Fine, because it is used by another shortcut. But the shortcut itself is not removed ! If I unistall the second product, the first shortcut remains.
How can I overcome this behavior ?
TIA
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
shortcut to shared component key file
Started by
matrot
, Apr 08 2003 09:52
2 replies to this topic
Posted 12 April 2003 - 21:56
As you might be knowing a component is a unit in an installer which is a collection of files and some additional info on these like shortcuts/advertising info. Uninstalling a shared component therefore will not uninstall the shortcut if the target is shared and remains after uninstall. This is msi behaviour.
One idea, is to use the RemoveFile table to remove the .lnk file while uninstall. If you know exact name of the shortcut of Product 1 then you can use this method.
One idea, is to use the RemoveFile table to remove the .lnk file while uninstall. If you know exact name of the shortcut of Product 1 then you can use this method.
Rajiv Madassery
Galway Scripting Center
Digital GlobalSoft Ltd.
(Subsidiary of Hewlett-Packard Company)
Galway Scripting Center
Digital GlobalSoft Ltd.
(Subsidiary of Hewlett-Packard Company)
Posted 13 April 2003 - 18:48
In my earlier reply, the RemoveFile table might not work since the components are "shared" try this out as custom action VBScript :
Dim fso, f1, s
Set fso = CreateObject("Scripting.FileSystemObject")
s = session.Property("ProgramMenuFolder")
Set f1 = fso.GetFile(s & "\Prod1shortcutname.lnk")
'MsgBox f1
f1.Delete
Dim fso, f1, s
Set fso = CreateObject("Scripting.FileSystemObject")
s = session.Property("ProgramMenuFolder")
Set f1 = fso.GetFile(s & "\Prod1shortcutname.lnk")
'MsgBox f1
f1.Delete
Rajiv Madassery
Galway Scripting Center
Digital GlobalSoft Ltd.
(Subsidiary of Hewlett-Packard Company)
Galway Scripting Center
Digital GlobalSoft Ltd.
(Subsidiary of Hewlett-Packard Company)