Installing shared files (not DLLs)
Posted 13 November 2003 - 15:39
To clarify, I wish to install the Java RunTime files in at least two different installers. Users are able to install more than one of these on one machine at a time. To save space on the users machine I have put the Java files into a 'Common' directory (the same directory in each installer).
However, doing this means that when the user uninstalls one of the products, then the Java files vanish and so the other products don't work. Is there a way of marking these as shared files so that some sort of ref count is kept in the same way as shared DLLs?
Posted 13 November 2003 - 17:48
Otherwise this is not possible because the legacy SharedDllRefCount mechanism only works for DLLs (as far as I know)
Posted 13 November 2003 - 19:36
Posted 14 November 2003 - 14:24
I have managed to get it to work using the SharedDllRefCount mechanism though (which I thought wouldn't work as well, just tried it on the off chance).
Thanks again for your help.
Posted 15 November 2003 - 02:46
If you use a merge module and include it in both setups Windows installer will take care of the reference counting automagically - the component "knows" it is used by different products (it is OK for several products to use the same component, but it is not OK for two products to use the same files, installed to the same folder with different component GUIDs).
If you get your application to obey this simple rule (nothing has two identities/GUIDs) you are well ahead to create a good windows installer setup.
Posted 18 December 2003 - 02:47
Do you have any recommendations on how to handle this situation? We obviously want to be able to install and uninstall each version without breaking another version.
Posted 18 December 2003 - 07:36
The other alternative would be to use a folder structure:
Edited by Glytzhkof, 18 December 2003 - 07:39.
Posted 18 December 2003 - 18:30
I was excited about your recommendation until I realized this. Do you have any other suggestions.
Here is additional information on this line of products. Each product in this product line consists of a set of Word or Excel templates and a set of core Excel and Word Add-ins and COM Add-ins (as mentioned above). We are currently using IS 5.5 to install each of these products seperately and the core components in each installation are marked as shared so that when one product is uninstalled it does not break any other installed products. Now we are moving to MSI and the products installed with MSI need to coexist with the products installed with IS 5.5.
I appreciate your help.
Posted 12 January 2004 - 17:37
For every component, the windows installer is able to support the SharedDllRefCount. For detailed info please search the Windows installer help file for "msidbComponentAttributesSharedDllRefCount". This is one of the possible Attributes for a component and defined in the component table.