Hi,
 
I am using WiX 3.6.2221.0 to create a bootstrapper that - among others - 
installs .NET Framework 4. To be flexible whether to download or embed the 
package I created two package groups within one fragment in a WXS file:
  <Fragment>
    <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework 
Setup\NDP\v4\Full" Value="Version" Variable="Netfx4FullVersion" />
    <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework 
Setup\NDP\v4\Full" Value="Version" Variable="Netfx4x64FullVersion" Win64="yes" 
/>
 
    <PackageGroup Id="Netfx4Full">
      <ExePackage Id="Netfx4Full" Cache="no" Compressed="no" PerMachine="yes" 
Permanent="yes" Vital="yes" SourceFile="packages\dotNetFx40_Full_x86_x64.exe"
                  
DownloadUrl="http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe";
                  DetectCondition="(NOT Netfx4FullVersion) OR (VersionNT64 AND 
(NOT Netfx4x64FullVersion))" />
    </PackageGroup>
 
    <PackageGroup Id="Netfx4FullEmbedded">
      <ExePackage Id="Netfx4FullEmbedded" Cache="no" Compressed="yes" 
PerMachine="yes" Permanent="yes" Vital="yes" 
SourceFile="packages\dotNetFx40_Full_x86_x64.exe"
                  DetectCondition="(NOT Netfx4FullVersion) OR (VersionNT64 AND 
(NOT Netfx4x64FullVersion))" />
    </PackageGroup>
  </Fragment>
 
The idea is that I can choose in the chain whether to embed the prerequisite or 
not:
Download version:
   <Chain>
      <PackageGroupRef Id='Netfx4Full' />
      <MsiPackage Id='WiXBurnTestSetup' Vital='yes' 
                  Name='data\core.msi' 
SourceFile='..\Setup\bin\Release\WiXBurnTestSetup.msi' />  
    </Chain>
Embedded version:
   <Chain>
      <PackageGroupRef Id='Netfx4FullEmbedded' />
      <MsiPackage Id='WiXBurnTestSetup' Vital='yes' 
                  Name='data\core.msi' 
SourceFile='..\Setup\bin\Release\WiXBurnTestSetup.msi' /> 
   </Chain>
 The problem is that in both cases the resulting EXE file has the same size. So 
it seems that both package groups are used even if I reference ‘Netfx4Full’ 
only. The interesting thing is that it works as expected if I put each package 
group into its own fragment like this:
  <Fragment>
    <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework 
Setup\NDP\v4\Full" Value="Version" Variable="Netfx4FullVersion" />
    <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework 
Setup\NDP\v4\Full" Value="Version" Variable="Netfx4x64FullVersion" Win64="yes" 
/>
 
    <PackageGroup Id="Netfx4Full">
      <ExePackage Id="Netfx4Full" Cache="no" Compressed="no" PerMachine="yes" 
Permanent="yes" Vital="yes" SourceFile="packages\dotNetFx40_Full_x86_x64.exe"
                  
DownloadUrl="http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe";
                  DetectCondition="(NOT Netfx4FullVersion) OR (VersionNT64 AND 
(NOT Netfx4x64FullVersion))" />
    </PackageGroup>
  </Fragment>
 
  <Fragment>
    <PackageGroup Id="Netfx4FullEmbedded">
      <ExePackage Id="Netfx4FullEmbedded" Cache="no" Compressed="yes" 
PerMachine="yes" Permanent="yes" Vital="yes" 
SourceFile="packages\dotNetFx40_Full_x86_x64.exe"
                  DetectCondition="(NOT Netfx4FullVersion) OR (VersionNT64 AND 
(NOT Netfx4x64FullVersion))" />
    </PackageGroup>
  </Fragment>
 
Is this behavior intended? And if so, what about the registry searches? Do I 
have to duplicate them into the other fragment?
 
Thanks,
Sven
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to