[wix-users] Patching

Steve Ogilvie SOGILVIE at msn.com
Mon Nov 19 08:20:50 PST 2018

Hey thanks a lot Chris I appreciate it...

I had everything done right but fragments:)

I hear you, small installers do they need to be patched?

But the customer is always right :)



Steven Ogilvie

E-mail:  sogilvie at msn.com<mailto:sogilvie at msn.com>

Winston Churchill, "We make a living by what we get, but we make a life by what we give."
From: Christopher Painter <chrpai at iswix.com>
Sent: Monday, November 19, 2018 10:54
To: WiX Toolset Users Mailing List
Cc: Steve Ogilvie
Subject: Re: Patching

Are all your components each in their own fragment?


"A sample product is created which puts different resources into fragments. You put resources into separate fragments so that the resources in each fragment can be filtered out of a patch. You might filter some resources out of a patch if you want to limit the patch to update only parts of your product or products."

I'm not a patching expert but recently went through this whole story and got it working all the way to digitally signed patches that install/uninstall without  UAC prompts.   I'm still not sure why my customer wanted this as his MSI was only 9MB  and 30 files but so be it.  He really wanted to be able to create 30KB - 300KB  patches  even though AFAIK he's not installing to a huge amount of machines at a time.

From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Steve Ogilvie via wix-users <wix-users at lists.wixtoolset.org>
Sent: Friday, November 16, 2018 4:26 PM
To: wix-users at lists.wixtoolset.org
Cc: Steve Ogilvie
Subject: [wix-users] Patching

Hi folks,

I am trying patching… I created a patch.wxs and specified just 4 binaries instead of all 11. But when creating the patch it stuff all the binaries in the patch…
Using WiX 3.11.1 and use melt/torch/candle/light/pyro to create the patch:

Used info from:
Patchwork - WiX Experts and Resources from FireGiant<https://www.firegiant.com/wix/tutorial/upgrades-and-modularization/patchwork/>
Patchwork. It wouldn't be terribly effective to create an upgrade installation package with megabytes of files in it just because one or two small files inside have to be renewed.



<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    TargetProductName="My Product"
    Manufacturer="My Company"
    DisplayName="My Patch"
    Description="Patch from RTM"
    Comments="Patch from RTM"

    <Media Id="5000"
      <PatchBaseline Id="media1"/>

    <PatchFamily Id='media1PatchFamily'
      <ComponentRef Id="ComponentEXE"/>
      <ComponentRef Id="cmp_one.dll"/>
      <ComponentRef Id="cmp_two.dll"/>
      <ComponentRef Id="cmp_three.dll"/>

Used this script to create patch:

set INTERMEDIATE_DIRECTORY=D:\SomePath\Installation\Patch

rem old and new folders has the “old/new” versions of the .MSI and .wixpdb files

rem Use melt.exe to create a better .wixpdb: https://www.joyofsetup.com/2013/07/16/easy-pure-wix-patching-with-melt/
call "C:\SomePath\WiX\3.11.1\Melt.exe" -v %OLD_INSTALLER%\MyProduct.msi -out %INTERMEDIATE_DIRECTORY%\MyProduct.Old.corrected.wixpdb -pdb %OLD_INSTALLER%\MyProduct.wixpdb -x %INTERMEDIATE_DIRECTORY%\ProductOldbits
call "C:\SomePath\WiX\3.11.1\Melt.exe" -v %NEW_INSTALLER%\MyProduct.msi -out %INTERMEDIATE_DIRECTORY%\MyProduct.New.corrected.wixpdb -pdb %NEW_INSTALLER%\MyProduct.wixpdb -x %INTERMEDIATE_DIRECTORY%\ProductNewbits
call "C:\SomePath\WiX\3.11.1\torch.exe" -p -v -xi "%INTERMEDIATE_DIRECTORY%\MyProduct.Old.corrected.wixpdb" "%INTERMEDIATE_DIRECTORY%\MyProduct.New.corrected.wixpdb" -out "%INTERMEDIATE_DIRECTORY%\patch_en.wixmst"
call "C:\SomePath\WiX\3.11.1\candle.exe" -v "%INTERMEDIATE_DIRECTORY%\patch_en.wxs"
call "C:\SomePath\WiX\3.11.1\light.exe" -v "%INTERMEDIATE_DIRECTORY%\patch_en.wixobj" -out "%INTERMEDIATE_DIRECTORY%\patch_en.wixmsp"
call "C:\SomePath\WiX\3.11.1\pyro.exe" -v "%INTERMEDIATE_DIRECTORY%\patch_en.wixmsp" -out "%INTERMEDIATE_DIRECTORY%\patch_en.msp" -t media1 "%INTERMEDIATE_DIRECTORY%\patch_en.wixmst"

Any idea why it is picking up ALL the binaries instead of just the 4 that I listed in the patch_en.wxs file (yes the compentref id are the same in the new/old installer)



Steve Ogilvie
Builds and Release

WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

More information about the wix-users mailing list