Reputation: 20179
Where do I include the Upgrade/Target Image in the following Patch XML? I need to include the Validate ProductId element which is why I cannot use my previous XML structure.
<Patch AllowRemoval="yes"
Classification="Update"
Comments="Patch"
Description="Patch"
DisplayName="Patch"
Manufacturer="..."
MoreInfoURL="http://..."
TargetProductName="Szenario Rechner"
Codepage="1252">
<Media Id="1000"
Cabinet="Patch.cab"
EmbedCab="yes"
Source="Cab1" >
<PatchBaseline Id="RTM">
<Validate ProductId="no" />
</PatchBaseline>
</Media>
<PatchFamily Id='pf1'
Version='1.2.7.0'
Supersede='yes'>
<ComponentRef Id="Szenariorechner" />
</PatchFamily>
</Patch>
Below is my previous patch XML.
<PatchCreation Id="224C316C-5894-4771-BABF-21A3AC1F75FF"
CleanWorkingFolder="yes"
WholeFilesOnly="yes">
<PatchInformation Description="Patch 1.0.4475.23974"
Comments="Patch 1.0.4475.23974"
ShortNames="no"
Languages="1033"
Compressed="yes"
Manufacturer="..." />
<PatchMetadata AllowRemoval="yes"
Description="Patch 1.0.4475.23974"
ManufacturerName="..."
TargetProductName="Update"
MoreInfoURL="http://"
Classification="Update"
DisplayName="Patch 1.0.4475.23974" />
<Family DiskId="2"
MediaSrcProp="Sample"
Name="Update"
SequenceStart="600">
<UpgradeImage SourceFile="C:\new.msi"
Id="PatchUpgrade">
<TargetImage SourceFile="C:\old.msi"
Order="2"
Id="PatchUpgrade"
IgnoreMissingFiles="no" />
</UpgradeImage>
</Family>
<PatchSequence PatchFamily="SamplePatchFamily"
Sequence="1.0.4475.23974"
Supersede="yes" />
</PatchCreation>
Upvotes: 0
Views: 574
Reputation: 32270
Your old patch authoring refers to the patch creation using Patch Creation Properties. The one you are referencing as a new uses purely WiX. As you can see, UpgradeImage/TargetImage pairs are not required for the later one.
Instead, you should author a TargetProductCodes element directly under the Patch root and add a number of TargetProductCode elements as its direct children:
<TargetProductCodes>
<TargetProductCode Id="PUT-PRODUCT-CODE-HERE" />
<TargetProductCode Id="PUT-PRODUCT-CODE-HERE" />
<TargetProductCode Id="PUT-PRODUCT-CODE-HERE" />
...
<TargetProductCode Id="PUT-PRODUCT-CODE-HERE" />
</TargetProductCodes>
When you build a patch, you feed the torch.exe with both base and updated MSI (or WIXPDB) files to generate a diff. Hope it's helpful. I suggest you to look through the "purely WiX" approach once again to understand it better.
Upvotes: 1