No problem.  Not a totally clean machine (they are dev boxes), however these 
components GUIDs never existed / never were installed before.  (brand new 
installations with brand new components).

Let me know what you find.


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jmcfadyen
Sent: Thursday, July 17, 2008 2:07 AM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Component Rules


hi john,

I see your point this is something that I have not experienced in the past
and doesnt seem to follow normal known logic. you mind if i test this
overnight and get back to you tomorrow. Are you testing this on a clean
machine just in case there is no relics of these components hanging around
from previous installs.

i normally do this type of work on a vm instance as its the only sure way to
avoid corruption from failed install / uninstalls.



John Nannenga wrote:
>
> Well, below is a really stupid example, but illustrates the behavior
> (refer to WiX code snippets below).
>
> Both installations install a single file and a single registry key.  The
> file components have the same Component GUID, but are installed to a
> different file system location.  The registry components have the same
> Component GUID, but are installed to a different registry location.
>
> When installing WixProject1, Foo.exe is installed to its location
> (PF\WixProject1\...), the registry key is written:
> HKLM\Software\WixProject1\InstallDir = 'PF\WixProject1\Foo.exe'
>
> When installing WixProject2, Foo.exe is installed to its location
> (PF\WixProject2\...), the registry key is written:
> HKLM\Software\WixProject2\InstallDir = 'PF\WixProject2\Foo.exe'
>
> ; Now uninstall one of them; say, WixProject1.
>
> The file is removed from the file system (PF\WixProject1\Foo.exe) and the
> WixProject1 directory is removed.  The registry key for WixProject1,
> remains.
>
> ; Now uninstall the other product; for me, say, WixProject2.
>
> The file is removed from the file system (PF\WixProject2\Foo.exe) and the
> WixProject2 directory is removed.  The registry key for WixProject2
> (HKLM\Software\WixProject2\InstallDir) is also removed.
>
> ; Now, both products are uninstalled.  Both products have their files
> removed, however, only the last product to be uninstalled has its non-file
> data removed (the registry key).  In this example,
> HKLM\Software\WixProject1\InstallDir remains.
>
> ==> Now, let's get even more stupid and attempt to resolve the obvious ICE
> error we get...
> [Warning 1 ICE69: Mismatched component reference. Entry 'Foo.reg' of the
> Registry table belongs to component 'Foo.reg'. However, the formatted
> string in column 'Value' references file 'Foo.exe' which belongs to
> component 'Foo.exe'. Components are in the same feature.
> C:\TestInstall\WixProject1\WixProject1\Product.wxs 16 1 WixProject1]
>
> ... by putting the registry item under the file component like so:
>
> ============BEGIN WixProject1.wxs==============
>           <Component Id="Foo.exe"
> Guid="8337196e-ed72-4957-8581-b2d56835399e">
>             <File Id="Foo.exe" Name="Foo.exe" Source="C:\Foo.exe"
> KeyPath="yes"/>
>             <RegistryValue Id="Foo.reg" Action="write"
> Key="Software\WixProject1" Root="HKLM" Name="InstallDir"
> Value="[#Foo.exe]" Type="string"/>
>           </Component>
> ============END==============
>
> ============BEGIN WixProject2.wxs==============
>           <Component Id="Foo.exe"
> Guid="8337196e-ed72-4957-8581-b2d56835399e">
>             <File Id="Foo.exe" Name="Foo.exe" Source="C:\Foo.exe"
> KeyPath="yes"/>
>             <RegistryValue Id="Foo.reg" Action="write"
> Key="Software\WixProject2" Root="HKLM" Name="InstallDir"
> Value="[#Foo.exe]" Type="string"/>
>           </Component>
> ============END==============
>
> ... then run the same install / uninstall scenario.
>
> Again, both files and registry keys are installed.  When uninstalling
> WixProject1, even though the key path to the component was indeed a file
> and the file did get removed, its registry key remains.
>
> When uninstalling WixProject2, then, its file and its registry key are
> removed.  WixProject1's registry key, however, still remains.
>
>
>
>
> How does this fit into the ref counting picture?
>
>
>
> WixProject1: Product.wxs
> ===========[BEGIN]======================================================
> <?xml version="1.0" encoding="UTF-8"?>
> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
>  <Product Id="8337196e-ed72-4957-8581-b2d56835399d" Name="WixProject1"
> Language="1033" Version="1.0.0.0" Manufacturer="WixProject1"
> UpgradeCode="01e4f72e-6342-476b-8e2b-78bd158ff00d">
>   <Package InstallerVersion="200" Compressed="yes" />
>   <Media Id="1" Cabinet="WixProject1.cab" EmbedCab="yes" />
>   <Directory Id="TARGETDIR" Name="SourceDir">
>    <Directory Id="ProgramFilesFolder">
>     <Directory Id="INSTALLLOCATION" Name="WixProject1">
>           <Component Id="Foo.exe"
> Guid="8337196e-ed72-4957-8581-b2d56835399e">
>             <File Id="Foo.exe" Name="Foo.exe" Source="C:\Foo.exe"
> KeyPath="yes"/>
>           </Component>
>           <Component Id="Foo.reg"
> Guid="8337196e-ed72-4957-8581-b2d56835399f">
>             <RegistryValue Id="Foo.reg" Action="write"
> Key="Software\WixProject1" KeyPath="yes" Root="HKLM" Name="InstallDir"
> Value="[#Foo.exe]" Type="string"/>
>           </Component>
>         </Directory>
>    </Directory>
>   </Directory>
>   <Feature Id="ProductFeature" Title="WixProject1" Level="1">
>       <ComponentRef Id="Foo.exe"/>
>       <ComponentRef Id="Foo.reg"/>
>   </Feature>
>
>  </Product>
> </Wix>
> ==========[END]=======================================================
>
>
> WixProject2: Product.wxs
> ==========[BEGIN=======================================================
> <?xml version="1.0" encoding="UTF-8"?>
> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
>  <Product Id="d56fabb0-0b2f-477f-b5d1-f0bf0f0fd569" Name="WixProject2"
> Language="1033" Version="1.0.0.0" Manufacturer="WixProject2"
> UpgradeCode="04a4766b-1d31-4ab7-bb57-e5d5b02ad6de">
>   <Package InstallerVersion="200" Compressed="yes" />
>   <Media Id="1" Cabinet="WixProject2.cab" EmbedCab="yes" />
>     <Directory Id="TARGETDIR" Name="SourceDir">
>       <Directory Id="ProgramFilesFolder">
>         <Directory Id="INSTALLLOCATION" Name="WixProject2">
>           <Component Id="Foo.exe"
> Guid="8337196e-ed72-4957-8581-b2d56835399e">
>             <File Id="Foo.exe" Name="Foo.exe" Source="C:\Foo.exe"
> KeyPath="yes"/>
>           </Component>
>           <Component Id="Foo.reg"
> Guid="8337196e-ed72-4957-8581-b2d56835399f">
>             <RegistryValue Id="Foo.reg" Action="write"
> Key="Software\WixProject2" KeyPath="yes" Root="HKLM" Name="InstallDir"
> Value="[#Foo.exe]" Type="string"/>
>           </Component>
>         </Directory>
>       </Directory>
>     </Directory>
>     <Feature Id="ProductFeature" Title="WixProject2" Level="1">
>       <ComponentRef Id="Foo.exe"/>
>       <ComponentRef Id="Foo.reg"/>
>     </Feature>
>   </Product>
> </Wix>
> ==========[END]=======================================================
>
> ________________________________________
> From: [EMAIL PROTECTED]
> [EMAIL PROTECTED] On Behalf Of jmcfadyen
> [EMAIL PROTECTED]
> Sent: Wednesday, July 16, 2008 9:32 PM
> To: wix-users@lists.sourceforge.net
> Subject: Re: [WiX-users] Component Rules
>
> hi chad,
>
> in reading this further this doesn't seem to follow known logic. this
> could
> easily be confirmed by monitoring the registry at the locations described
> in
> my blog post before and after each installation. the logic you present in
> this case doesn't match the logic I have accustomed myself too or tested
> in
> the past. Im very interested to hear of your findings.
>
>
> steve baker-7 wrote:
>>
>> 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
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Re%3A-Component-Rules-tp18491876p18500445.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
>
>

--
View this message in context: 
http://www.nabble.com/Re%3A-Component-Rules-tp18491876p18502749.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

Reply via email to