Windows Installer registers components using the component GUID, ProductCode and key path to the component. So for files, each instance of the component, based on ProductCode registers with its own path. The component can be registered more than once to the same path as well but each instance of the component will still be registered based on the ProductCode that installed it. This provides the function of "component counting", similar to reference counting.
Uninstalling is straight-forward, as long as a component is registered to a path with any ProductCode it will not be removed. So if you install Component A to a shared location with Product A and Product B, when you uninstall Product A, the component registration associated with Product A is removed but since it is still registered to that same path with Product B the file will not be removed from the system. This is how the component counters are used in practice to manage shared resources. As for upgrading, if you install a patch or upgrade that updates a component, only the component for the ProductCode being updated receives the update. Now, if the component is installed to a shared location where other products have installed it those will receive the update as well but only by virtue of the fact that they all installed the file to the same location. When installing files to shared locations using Windows Installer you need to consider the file versioning rules and that each MSI has its own "logic". If another setup developer does something stupid like has REINSTALLMODE set to include the 'a' option by default to overwrite all files regardless of versioning rules, then that MSI would downgrade your shared component on a repair/reinstall. Your MSI repair/reinstall would then upgrade it again. This is unlikely to happen but it does illustrate that Windows Installer registration can be configured in a way that two MSIs are conflicting with one another and repeatedly attempt to change the system in different ways. -- View this message in context: http://n2.nabble.com/Component-Rules-101-tp4494192p4494894.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users