OK, what would the recommended approach be for non-file based components and their GUIDs, considering backwards compatibility with respect to multiple instances?
[How does path (for file based component data) come into the picture? ] ________________________________________ From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of jmcfadyen [EMAIL PROTECTED] Sent: Wednesday, July 16, 2008 9:15 PM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Component Rules hi all, I think you may be getting confused with reference counting here. There are two different types of reference count available. Once is windows based and the other is windows installer based. Windows reference counting is handled by setting a registry key which monitors file actions. Windows Installer reference counting is handled at the component guid level. Each component is recorded during installation and each product that installs that component is listed under the component. Where you have two products installing the same component both of those components parent products will be listed under the component detail. for example <ComponentA> <ProductA> <ProductB> when you uninstall a product it simply removes its product reference from under the component. where there are no products left it will remove the component. As such two products sharing the same component will not allow removal of a component unless both products are uninstalled. So if you uinstall ProductA without uninstalling ProductB you should find the component stays installed. this is considerable detail written about this process here where you can prove this functionality for yourself. http://johnmcfadyen.spaces.live.com/blog/cns!9DD01136FC094724!136.entry now in relation to having two component with different files sharing the same GUID this is not recommended by ms. component guids should only be matched where files have the same filename & path this is regardless of version. For example if your have ProductA and ProductB both sharing MSCOMCTL32.OCX of different versions both components should have the same GUID where the File (predominantly DLL's) are backwards compatible. So if you had multiple Products which have the same file in the same path of different version they should all share the same component GUID assuming backwards compatibility. Where a file is using the same name but is not backwards compatible the GUID's should not be matched. In many cases only the dev will know this information. John Nannenga wrote: > > I believe component ref-counting for file based data is handled at the > product code and location level. That's why Chad see's the results he > does for the below situation regarding the web.config file. > > > Component ref-counting for non-file based data (registry information, ini > keys, shortcuts, etc...) is based upon the component GUID. If you have > two registry keys (or shortcuts, etc...) ('A' and 'B' for example) both > with a GUID of 'FOO'; although 'A' and 'B' might be two entirely separate > keys, Both will be written. However, at uninstall, only the last to be > uninstalled, will be uninstalled. > > > > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Steve Baker > Sent: Wednesday, July 16, 2008 11:50 AM > To: [EMAIL PROTECTED]; wix-users@lists.sourceforge.net > Subject: Re: [WiX-users] Component Rules > > Chad, > > The situation you describe is exactly what we will be doing. All 30 of > these web applications get installed to the same machine, all to different > locations on the file system. Until yesterday I believed exactly as you > have stated, the second application updating the Component reference would > cause problems, which is why i have all the duplication between the > projects. After testing with 2 scaled down wix package projects and one > library project what I have found is this. > > Install WebApp1 - web.config is in correct location for WebApp1 > Install WebApp2 - web.config for WebApp2 is in correct location, > web.config for WebApp1 remains untouched. > Uninstall WebApp1 - web.config for WebApp1 is properly removed. > Uninstall WebApp2 - web.config for WebApp2 is properly removed. > > It doesn't matter which app i uninstall first, the behavior is correct. > This has been tested with config files and .NET assemblies, the behavior > is the same. > > This is not the behavior i expected, but now that i have found that this > is what happens, i am very tempted to consolidate the components to the > common library as mentioned earlier. > > Thanks, > > Steve > > ---------------------------------------- > > From: Chad Petersen <[EMAIL PROTECTED]> > Sent: Wednesday, July 16, 2008 11:05 AM > To: [EMAIL PROTECTED]>, "General discussion for Windows > Installer XML toolset." <wix-users@lists.sourceforge.net > Subject: RE: [WiX-users] (no subject) > > Steve, one possible risk is as follows. It'll likely happen if you > install any two MSIs that contain the same Component, but a different > file, on one computer. The first MSI will set the Component reference. > The second MSI will alter that Component reference to point to the new > file. Then if you uninstall the first MSI it will probably remove the > copy of the file from the second installer with it. > > You can mark Components as Permanent and it might leave them alone. > > Since it is not a DLL I don't believe the RefCount would help at all in > this situation. > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Steve > Baker > Sent: Wednesday, July 16, 2008 8:19 AM > To: wix-users@lists.sourceforge.net > Subject: [WiX-users] (no subject) > > Hey all, > > I find myself in a situation where I need some feedback on component > rules. I have over 30 solutions that each have a wix installer project > in them. each solution is a web site that is deployed automatically and > internally. right now i have a ton of duplication between each of the > install projects and am looking to reduce the maintenance overhead. i > have a common wix library project that i have moved the UI and some > launch conditions into. I'd like to move more into this common location > but i get stuck with this particular situation. > > each project contains many components that look like the following: > > < Component Id = " StagingConfiguration " Guid = " > 935B1135-E34D-49DA-843E-D984B8F2C5ED " DiskId = " 1 " > > < File Id = " staging.config " Name = " web.config " Source = " > $(var.Web.UI.ProjectDir)staging.web.config " /> > < Condition > STAGING > > If i moved that component (and i have at least ten more just like it) > into my common wix library each web project would have the same > component guid for its web.config file. I have read over the component > rules again and again and can't find anything specific about doing this, > but it still seems like there is something fundamentally wrong with the > idea. > > I would appreciate if somebody could let me know what the risk is with > having more than one msi contain a component with the same guid (and a > different file). I have nobody here that understands windows installer > to bounce the idea off. > > Thanks, > > Steve > > ------------------------------------------------------------------------ > - > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > -- View this message in context: http://www.nabble.com/Re%3A-Component-Rules-tp18491876p18500279.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users