I have Installer created using wix.Now i want to patch for it.I succeeded creating patch 1 which changes sample exe to another exe and also increases product version number from 1.0.0.0 to 1.0.0.1. Till this it's working fine.
Now i want 2nd Patch which will do some minor changes. and this patch should install only if patch 1 is installed and change version to 1.0.0.2.
i am referring this tutorial http://wix.tramontana.co.hu/tutorial/upgrades-and-modularization/patchwork
Now the problem is my 2nd patch is doing changes what it should do.but it's getting install even if patch 1 is not installed.
Note:
1> Product Code/Upgrade Code is same in all 3 baselines.
2> Version number is different for 1st,2nd, and 3rd baseline like for first baseline its 1.0.0.0, for 2nd 1.0.0.1 and for 3rd its 1.0.0.2
Patch1 Code:
<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Patch AllowRemoval="yes" Manufacturer="NSS" MoreInfoURL="www.abcdxyz.com"
DisplayName="NSS 1.0.0.1" Description="Small Update Patch" Classification="Update">
<Media Id='5000' Cabinet='Sample.cab'>
<PatchBaseline Id='Sample'/>
</Media>
<PatchFamily Id='SamplePatchFamily' Version='1.0.0.1'>
<PropertyRef Id="ProductVersion"/>
<ComponentRef Id='NSSTestAPP'/>
</PatchFamily>
</Patch>
</Wix>
Patch 2 Code:
<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Patch AllowRemoval="yes" Manufacturer="NSS" MoreInfoURL="www.abcdxyz.com"
DisplayName="NSS 1.0.0.2" Description="Small Update Patch" Classification="Update">
<Media Id='5000' Cabinet='Sample.cab'>
<PatchBaseline Id='Sample'/>
</Media>
<PatchFamily Id='SamplePatchFamily' Version='1.0.0.2'>
<PropertyRef Id="ProductVersion"/>
<ComponentRef Id = 'NSSTestAPP'/>
<ComponentRef Id = 'TestDll'/>
</PatchFamily>
</Patch>
</Wix>
please help to sort out the problem.
Another option would be to run torch against 1.0.0.0 and 1.0.0.2 and setting the patchFamily attribute Supersede="yes". (Assuming the .1 code is also in your .2 build) This will include .1 files in the .2 patch as well. If the .1 patch is installed it will be superseded with .2, if .1 is not installed it won't matter because .2 already includes it.