views:

32

answers:

2

In the WiX help documentation, Using Purely WiX for patching, the sample patch includes this section:

<Media Id="5000" Cabinet="RTM.cab">
    <PatchBaseline Id="RTM"/>
</Media>

and the command to build the patch references 'RTM' as well:

pyro.exe patch\patch.wixmsp -out patch\patch.msp -t RTM patch\diff.wixmst

The docs say the PatchBaseline element "Identifies a set of product versions.", but I'm not clear on what that means.

What does this element control, and what are the effects of changing or omitting it?

+1  A: 

That element is less interesting than its child: Validate. Take a look at the attributes on Validate and you'll see the different ways to target products with the patch. From the Remarks:

A transform contains the differences between the target product and the upgraded product. When a transform or a patch (which contains transforms) is applied, the following properties of the installed product are validated against the properties of the target product stored in a transform.

  • ProductCode
  • ProductLanguage
  • ProductVersion
  • UpgradeCode

Windows Installer simply validates that the ProductCode, ProductLanguage, and UpgradeCode of an installed product are equivalent to those propeties of the target product used to create the transform; however, the ProductVersion can be validated with a greater range of comparisons.

You can compare up to the first three fields of the ProductVersion. Changes to the fourth field are not validated and are useful for small updates. You can also choose how to compare the target ProductVersion used to create the transform with the installed ProductVersion. For example, while the default value of 'Equals' is recommended, if you wanted a minor upgrade patch to apply to the target ProductVersion and all older products with the same ProductCode, you would use 'LesserOrEqual'.

Rob Mensching
A: 

I'm also confused by this - I'd think a baseline would be the n-1 version? yet RTM isnt referenced in the creation of the first MSI?

if you had three version (v1, v2, and v3) - what would the PatchBaseline be for each version?

stuck
Dave Andersen

related questions