PackageGroups
To split your package definitions up for more modularity, place them within PackageGroup
elements. You can then reference the group within your Chain
element with PackageGroupRef
. The following is an example where we separate the detection (via RegistrySearch
) and installation of SQL Server into its own fragment:
<Bundle Name="Awesome Software Bundle"
Version="1.0.0.0"
Manufacturer="Awesome Company"
Copyright="(c) All rights reserved."
UpgradeCode="3601032C-A8C9-4323-88E0-1967A9C2145E">
<BootstrapperApplicationRef
Id="WixStandardBootstrapperApplication.RtfLicense" />
<Chain>
<PackageGroupRef Id="SQL_SERVER_2012_EXPRESS"/>
</Chain>
</Bundle>
<Fragment>
<util:RegistrySearch
Id="SqlInstanceFound"
Root="HKLM"
Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL"
Value="$(var.SqlServerInstance)"
Result="exists"
Variable...