Customizing the Default WiX Template

Parent Previous Next

The default WiX template consists of two parts:


The main WXS defines the overall MSI structure, including features, directories, etc.  During MSI generation, WiX's Heat.exe tool scans the redist folder (obj\$(Configuration)\redist) and generates a second WXS XML file that defines the entire contents of the redist folder.  That generated WXS is post-processed by Heat via an XSLT file that adds Deployment Framework for BizTalk-specific items such as Start menu shortcuts, generated file cleanup steps, etc.


The main WXS file, the XSLT file or both may be overridden by your project via two properties in your deployment project file.  In effect, you can completely replace the default WiX authoring with your own or just modify portions of the default behavior.  The two properties are WixProjectFile and WixHeatTransformFile, respectively.


To customize the MSI definition:


1. Copy the file GenericBizTalkMSI.wxs from the Deployment Framework for BizTalk install folder, Developer subfolder into your deployment project folder (where the .btdfproj is located)

If you wish, rename the file but keep the .wxs extension as it is a WiX convention.


2. In your .btdfproj, set the WixProjectFile property to GenericBizTalkMSI.wxs or your custom name

The property may be included in any PropertyGroup, but is commonly placed in the PropertyGroup that includes ProductId and ProductVersion.


<PropertyGroup>

 ...

 <WixProjectFile>GenericBizTalkMSI.wxs</WixProjectFile>

 ...

</PropertyGroup>


3. Modify the WXS file as desired

Your local copy of the WXS will be used when generating an MSI for server deployment.


To customize the Start menu shortcuts:


1. Copy the file RedistComponentGroup.xslt from the Deployment Framework for BizTalk install folder, Developer subfolder into your deployment project folder (where the .btdfproj is located)

If you wish, rename the file but keep the .xslt extension.


2. In your .btdfproj, set the WixHeatTransformFile property to RedistComponentGroup.xslt or your custom name

The property may be included in any PropertyGroup, but is commonly placed in the PropertyGroup that includes ProductId and ProductVersion.


<PropertyGroup>

 ...

 <WixHeatTransformFile>RedistComponentGroup.xslt</WixHeatTransformFile>

 ...

</PropertyGroup>


3. Modify the XSLT file as desired

Your local copy of the XSLT will be used when generating an MSI for server deployment.


Using a different version of WiX

If you prefer to use a newer version of WiX than what is included with the Deployment Framework, you can override the registry key where the Deployment Framework searches for WiX via the WiXRegistryKey property.  Or, you can put the WiX binaries in any location you prefer and override the WixDir property.



Created with the Personal Edition of HelpNDoc: Easy EBook and documentation generator