Installing the same component to two different folders does not break component rules - this is allowed. Indeed, if installed to the same location, the behaviour may be surprising - installing product A with component version 1 then product B with component version 2, then uninstalling B will leave component version 2 installed.
However, if you do install to different locations, I don't think Windows Installer can fixup the COM registration when uninstalling the newer version, even if you use the Class, TypeLib etc tables rather than raw registry entries (or @Advertise='no'). If you had versions 1 2 and 3 installed in different locations, then uninstalled 3, Windows Installer would see that this component was no longer referenced at this location and remove the component, therefore removing the registration. If you don't make the registration part of the component containing the file, instead making it a different component, it doesn't help because the registration information points to the wrong place (the file that's just been removed). Hypothetically I suppose Windows Installer could compare the version numbers of the key files of the other components (if the Class table were used) and re-register the most recent one. But I don't know if it does, and advertising classes (using the Class table) gives other surprising problems (e.g. asking for B's installer when you launch product A). I think my prescriptive guidance for COM objects would have to be: use registration-free COM whenever possible; when not possible, pick a shared location (e.g. a company folder under Program Files\Common Files) and always install the component there. Or do a private build (different GUIDs, ProgId, etc) for each product that uses it. -- Mike Dimmick -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vilhelm Sjoberg Sent: 09 October 2007 11:59 To: wix-users@lists.sourceforge.net Subject: [WiX-users] Type libraries and component rules Hello wix-users, this is a follow up to my emails from a few days ago about problems with COM registration. I think the problem is that I am violating component rules, but I'm not sure how to avoid it. My program ships with a com server dll file which will need to be upgraded from time to time. The plan was to keep the different version of the file as completely seperate components, installed into different directories. However, since the typelibrary GUID of the different versions is the same, when they are registered some of the registry keys written will be the same. So now I have different components writing the same key, and this seems to break reference counting (so when upgrading the keys get clobbered during the uninstall phase). On the other hand, I don't think I can put the different versions of the dll in the same component, since it will be installed to a different directory, again breaking component rules. Does anyone have any idea what to do here? Thanks in advance, Vilhelm -- View this message in context: http://www.nabble.com/Type-libraries-and-component-rules-tf4593489.html#a131 13374 Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users