[wix-users] Wix patching - How to prevent downgrade when patching

khacminh ho khacminh_return at yahoo.com
Mon May 30 21:47:56 PDT 2016


Hi,
I follow the this instruction, and successfully create the patch file from the first version (1.0.1.0) to the second version is (1.0.1.1).
  
|  
|   |  
WiX toolset
 Using Purely WiX  |  |

  |

 

Then, I create the third version (1.0.1.2). I uninstall my product, then install version 1.0.1.2. After that, I run patch file (version 1.0.1.0 to 1.0.1.1). Then I check programs and features, my product version is now 1.0.1.1. But when I check installation direction, the version of my software is still 1.0.1.2.
My question is: How can I prevent patch file downgrade my product? This means: when version 1.0.1.2 installed, the patch file 1.0.1.1 will be prevent to install.
Here is my patch.wxs content:

<?xml version="1.0" encoding="UTF-8"?><Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <?define ProductVersion = "1.0.1.1"?>
  <Patch       AllowRemoval="yes"      Manufacturer="My Company"       DisplayName="My Product patch $(var.ProductVersion)"      Description="My Product patch version $(var.ProductVersion)"      Comments="Update My Product to version $(var.ProductVersion)"      Classification="Update">
      <Media Id="100" Cabinet="Software.cab">          <PatchBaseline Id="RTM"/>      </Media>
      <PatchFamily Id='PatchFamily' Version='$(var.ProductVersion)' Supersede='yes'/>  </Patch></Wix>

Thank you in advance.Minh


More information about the wix-users mailing list