[wix-users] Patch installation

Stephanie Lutz (Plumbline) v-stlutz at microsoft.com
Mon Aug 8 18:20:20 PDT 2016


Thanks for all of the insights. I really appreciate the help.   (I've inherited this patching strategy for the product with no prior Wix or install experience, and the original authors are not available for help.)  
My original understanding for the Supersede attribute was that it would need to be "Yes" in order to ensure that it would replace previous versions of a file.   But I do see that it is defined to cause the entire patch family to be replaced.  I will set that to "no" and hopefully it will solve our issues.

Also, I found documentation that suggested that a patch could be included in multiple patch families.  Is anybody aware whether that is possible?  

BTW, our original patch attempts used different patch families for each patch applied to the original cumulative update.  In one case, we had 2 separate updates to the same .dll with different versions, and it failed to install the later version. So, for the log below, we had the cumulative update installed (GUID = 73CDB3A4-1499-413B-9028-2E308B4BF5CC) and installed one update for aaa.dll:

C03967C5-27BF-4500-AE88-F7B46A4A22FA}	PatchFamily: HotFix_36064_Client	Sequence: 9.1.30820.1

Then we installed another update for aaa.dll:
{1489BC3A-6CC9-4335-89A1-6AADC6FE67A3}	PatchFamily: CU1_Hotfix_36438_Client	Sequence: 9.1.31102.3

The second update did not install.  From the log, it appears in this instance that it does sort based on the GUID:

PATCH SEQUENCER: Step 1
PATCH SEQUENCER: patch {73CDB3A4-1499-413B-9028-2E308B4BF5CC} (PatchFamily SL2015_CU1_Client) will be sequenced.
PATCH SEQUENCER: patch {C03967C5-27BF-4500-AE88-F7B46A4A22FA} (PatchFamily HotFix_36064_Client) will be sequenced.
PATCH SEQUENCER: patch {1489BC3A-6CC9-4335-89A1-6AADC6FE67A3} (PatchFamily CU1_Hotfix_36438_Client) will be sequenced.
PATCH SEQUENCER: The resulting #_OrderedGUIDs table:
Patch: {1489BC3A-6CC9-4335-89A1-6AADC6FE67A3}	Order: 0	(Family: CU1_Hotfix_36438_Client)
Patch: {73CDB3A4-1499-413B-9028-2E308B4BF5CC}	Order: 1	(Family: SL2015_CU1_Client)
Patch: {C03967C5-27BF-4500-AE88-F7B46A4A22FA}	Order: 2	(Family: HotFix_36064_Client)
The ordered #_QFESequence table: - has the final sequence of QFEs.  It lists each PatchGUID only once.
  PatchGUID: {1489BC3A-6CC9-4335-89A1-6AADC6FE67A3}	ResultantVersion: 9.00.20926.01	PatchFamily: CU1_Hotfix_36438_Client	Sequence: 9.1.31102.3	Order: 0
  PatchGUID: {73CDB3A4-1499-413B-9028-2E308B4BF5CC}	ResultantVersion: 9.00.20926.01	PatchFamily: SL2015_CU1_Client	Sequence: 9.1.30423.1	Order: 1
  PatchGUID: {C03967C5-27BF-4500-AE88-F7B46A4A22FA}	ResultantVersion: 9.00.20926.01	PatchFamily: HotFix_36064_Client	Sequence: 9.1.30820.1	Order: 2
The #_QFESequence table with patches sorted on Sequence within Patch Families:
    PatchGUID: {73CDB3A4-1499-413B-9028-2E308B4BF5CC}	PatchFamily: SL2015_CU1_Client	Sequence: 9.1.30423.1	SequenceOrder: 0	Type: QFE
    PatchGUID: {C03967C5-27BF-4500-AE88-F7B46A4A22FA}	PatchFamily: HotFix_36064_Client	Sequence: 9.1.30820.1	SequenceOrder: 0	Type: QFE
    PatchGUID: {1489BC3A-6CC9-4335-89A1-6AADC6FE67A3}	PatchFamily: CU1_Hotfix_36438_Client	Sequence: 9.1.31102.3	SequenceOrder: 0	Type: QFE
PATCH SEQUENCER: QFE patch {C03967C5-27BF-4500-AE88-F7B46A4A22FA} cannot be superseded because there is no supersedence defined in HotFix_36064_Client family yet for this type
PATCH SEQUENCER: QFE patch {C03967C5-27BF-4500-AE88-F7B46A4A22FA} will attempt to supersede in HotFix_36064_Client family, starting from sequence 9.1.30820.1
PATCH SEQUENCER: QFE patch {73CDB3A4-1499-413B-9028-2E308B4BF5CC} cannot be superseded because there is no supersedence defined in SL2015_CU1_Client family yet for this type
PATCH SEQUENCER: QFE patch {73CDB3A4-1499-413B-9028-2E308B4BF5CC} will attempt to supersede in SL2015_CU1_Client family, starting from sequence 9.1.30423.1
PATCH SEQUENCER: QFE patch {1489BC3A-6CC9-4335-89A1-6AADC6FE67A3} cannot be superseded because there is no supersedence defined in CU1_Hotfix_36438_Client family yet for this type
PATCH SEQUENCER: QFE patch {1489BC3A-6CC9-4335-89A1-6AADC6FE67A3} will attempt to supersede in CU1_Hotfix_36438_Client family, starting from sequence 9.1.31102.3
 SequencePatches returns success.
Final Patch Application Order:
    {1489BC3A-6CC9-4335-89A1-6AADC6FE67A3} - S:\Program Files (x86)\Microsoft Dynamics\SL\Bug36438SY\Microsoft.Dynamics.SL.2015.CU1.HotFix
    {73CDB3A4-1499-413B-9028-2E308B4BF5CC} - 
    {C03967C5-27BF-4500-AE88-F7B46A4A22FA}

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Fyodor Koryazhkin
Sent: Monday, August 8, 2016 2:42 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Patch installation

Hi,
As I understand the order of how patches are applied depends on patch sequence in the same patch family. For example, if you have 3 patches that belong to the same family and the patch sequence is 1, 2 and 3 and then you install them in the order 3, 1, 2, the actual order will be 1, 2, 3. This can be clearly seen in the log file. Patch GUID has nothing to doowith patch order.

On Aug 8, 2016 6:05 AM, "Robert Goodridge" <robert.goodridge at lansa.com.au>
wrote:

I have not dealt with patches at the level you need. Every patch we create for every product uses this template:
<Wix xmlns="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fschemas.microsoft.com%2fwix%2f2006%2fwi&data=02%7c01%7cv-stlutz%40microsoft.com%7c4c71e4cfbc664714523708d3bf57102e%7c72f988bf86f141af91ab2d7cd011db47%7c1%7c0%7c636062353070873681&sdata=DIxI6UC43OXUEADpn7BMXaxF1a6dnhnRho9swjKnvec%3d">

        <Patch AllowRemoval="no" Codepage="1252"
Manufacturer="$(var.Manufacturer)"
MoreInfoURL="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.lansa.com.au&data=02%7c01%7cv-stlutz%40microsoft.com%7c4c71e4cfbc664714523708d3bf57102e%7c72f988bf86f141af91ab2d7cd011db47%7c1%7c0%7c636062353070873681&sdata=E54SujwrDfd8SRlu3zwrqSxCyvT8kNYbv0nNOgHcZ2A%3d"
                DisplayName="$(var.Product)" Description="$(var.Product)"
Classification="Update">

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

                <PatchFamilyRef Id="VLPatchFamily"/>
        </Patch>

        <Fragment>
                <PatchFamily Id="VLPatchFamily"
Version="$(var.CurrentVersion)" Supersede="no"/>
      <FeatureRef Id="ProductFeature" />
        </Fragment>

</Wix>

The same PatchFamily every time. And we always set Supersede="no". And our patches are cumulative. That is, they include all changes since the MSI was built. You only need to install the latest patch to install all changes.
Keeping it simple seemed the only way to be able to describe to our programmers what the behaviour is and for them then to deploy changes to their application with full understanding of the expected behaviour.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Phill Hogland
Sent: Saturday, 6 August 2016 5:39 AM
To: 'WiX Toolset Users Mailing List' <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Patch installation

I have almost no understanding of patching, so I should probably remain quiet, but is the issue related to having defined ccc.exe's family as being superseded by the other exe's and having previously applied the superseding patch?  (Sorry if I am way off base!)

________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Stephanie Lutz (Plumbline) <v-stlutz at microsoft.com>
Sent: Friday, August 5, 2016 2:02:24 PM
To: 'WiX Toolset Users Mailing List'
Subject: Re: [wix-users] Patch installation

Thank you, Robert - I really appreciate the information and suggestions.

We are having a problem with our patches being installed, and I'm apparently not thinking of this correctly.  (If there's a forum that you know for windows installer that I post my questions to, I'll be glad to take my questions there.)  I've looked at the documentation, and, if I only look at the file versions, it doesn't make sense to me why this isn't working.  I can only see a problem if it takes patch families and GUIDs into consideration.  (I'd be very glad if someone could help point out what I'm not seeing.)

The following is a scenario where a file was not installed and the logging during installation.  I installed our cumulative patch, installed one patch which updated executables aaa.exe and bbb.exe; installed a patch that updated a report file - zzz.rpt; installed a patch that updated a different executable, ccc.exe.  The final executable was not installed - and the install logging shows that it was superseded when the patches were
sequenced:

Installed cumulative patch:  GUID 73CDB3A4-1499-413B-9028-2E308B4BF5CC

Installed patch - updated executables aaa.exe, bbb.exe:  GUID =
DF71A6FC-B57A-4D06-BCDD-F982969FB2D1 for the patch
                        Initial version for aaa.exe was 9.1.30423.1
                        Initial version for bbb.exe was 9.0.20926.1

                        Final version for both:  9.1.40210.0


Installed patch - updates zzz.rpt:  GUID = 574E1530-15EC-4B3C-8677- 7EA5D7733EFE
                        Updated version:  date 1/11/2016

Installed patch - updates executable ccc.exe:  GUID = 0E191700-9824-4C29-8E8E-413F68041C4F
                        Initial version was 9.0.20926.1
                        New version is 9.1.31123.00


PATCH SEQUENCER: The initial #_Predecessor table:
PatchFamily: SL2015_CU1_Hotfix_36042_Server,    PatchGUID:
{574E1530-15EC-4B3C-8677-7EA5D7733EFE},      Predecessor GUID: NULL
PatchFamily: SL2015_CU1_Server, PatchGUID:
{0E191700-9824-4C29-8E8E-413F68041C4F},
    Predecessor GUID: NULL
PatchFamily: SL2015_CU1_Server, PatchGUID:
{DF71A6FC-B57A-4D06-BCDD-F982969FB2D1},
    Predecessor GUID: {0E191700-9824-4C29-8E8E-413F68041C4F}
PATCH SEQUENCER: Step 1
PATCH SEQUENCER: patch {574E1530-15EC-4B3C-8677-7EA5D7733EFE} (PatchFamily
SL2015_CU1_Hotfix_36042_Server) will be sequenced.
PATCH SEQUENCER: patch {0E191700-9824-4C29-8E8E-413F68041C4F} (PatchFamily
SL2015_CU1_Server) will be sequenced.
PATCH SEQUENCER: Step 2
PATCH SEQUENCER: patch {DF71A6FC-B57A-4D06-BCDD-F982969FB2D1} (PatchFamily
SL2015_CU1_Server) will be sequenced.
PATCH SEQUENCER: The resulting #_OrderedGUIDs table:
Patch: {0E191700-9824-4C29-8E8E-413F68041C4F}   Order: 0        (Family:
SL2015_CU1_Server)
Patch: {574E1530-15EC-4B3C-8677-7EA5D7733EFE}   Order: 1        (Family:
SL2015_CU1_Hotfix_36042_Server)
Patch: {DF71A6FC-B57A-4D06-BCDD-F982969FB2D1}   Order: 2        (Family:
SL2015_CU1_Server)
The ordered #_QFESequence table: - has the final sequence of QFEs.  It lists each PatchGUID only once.
 PatchGUID: {0E191700-9824-4C29-8E8E-413F68041C4F}       ResultantVersion:
9.00.20926.01 PatchFamily: SL2015_CU1_Server  Sequence: 9.1.31123.0
 Order: 0
 PatchGUID: {574E1530-15EC-4B3C-8677-7EA5D7733EFE}       ResultantVersion:
9.00.20926.01 PatchFamily: SL2015_CU1_Hotfix_36042_Server     Sequence:
9.1.40623.0   Order: 1
 PatchGUID: {DF71A6FC-B57A-4D06-BCDD-F982969FB2D1}       ResultantVersion:
9.00.20926.01 PatchFamily: SL2015_CU1_Server  Sequence: 9.1.40210.0
 Order: 2
The #_QFESequence table with patches sorted on Sequence within Patch
Families:
 PatchGUID: {574E1530-15EC-4B3C-8677-7EA5D7733EFE}       PatchFamily:
SL2015_CU1_Hotfix_36042_Server     Sequence: 9.1.40623.0   SequenceOrder:
0        Type: QFE
 PatchGUID: {0E191700-9824-4C29-8E8E-413F68041C4F}       PatchFamily:
SL2015_CU1_Server  Sequence: 9.1.31123.0   SequenceOrder: 0        Type: QFE
 PatchGUID: {DF71A6FC-B57A-4D06-BCDD-F982969FB2D1}       PatchFamily:
SL2015_CU1_Server  Sequence: 9.1.40210.0   SequenceOrder: 1        Type: QFE
 PATCH SEQUENCER: QFE patch {DF71A6FC-B57A-4D06-BCDD-F982969FB2D1} cannot be superseded because there is no supersedence defined in SL2015_CU1_Server family yet for this type  PATCH SEQUENCER: QFE patch {DF71A6FC-B57A-4D06-BCDD-F982969FB2D1} will attempt to supersede in SL2015_CU1_Server family, starting from sequence 9.1.40210.0  PATCH
SEQUENCER: QFE patch {574E1530-15EC-4B3C-8677-7EA5D7733EFE} cannot be superseded because there is no supersedence defined in SL2015_CU1_Hotfix_36042_Server family yet for this type  PATCH SEQUENCER:
QFE patch {574E1530-15EC-4B3C-8677-7EA5D7733EFE} will attempt to supersede in SL2015_CU1_Hotfix_36042_Server family, starting from sequence
9.1.40623.0  PATCH SEQUENCER: QFE patch {0E191700-9824-4C29-8E8E-413F68041C4F}
will attempt to supersede in SL2015_CU1_Server family, starting from sequence 9.1.31123.0  PATCH SEQUENCER: QFE patch {0E191700-9824-4C29-8E8E-413F68041C4F}
is superseded SequencePatches returns success.
Final Patch Application Order:
 {574E1530-15EC-4B3C-8677-7EA5D7733EFE} - {DF71A6FC-B57A-4D06-BCDD-F982969FB2D1}
- Other Patches:
 Superseded: {73CDB3A4-1499-413B-9028-2E308B4BF5CC} -
 Superseded: {7D4F660B-878A-4E38-B11F-2B26ED83626F} -
 Superseded: {0E191700-9824-4C29-8E8E-413F68041C4F} - R:\HotFix\R2015CU1\Bug36563TM\Microsoft.Dynamics.SL.2015.CU1.HotFix




So, from the above, the patch with GUID 0E191700-9824-4C29-8E8E-413F68041C4F
was superseded.  The only way I could make sense of this was that it is in the same patch family as another patch with a later version number - even though they update completely different executables.

Thank you for any insight.



-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Robert Goodridge
Sent: Thursday, August 4, 2016 6:29 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Patch installation

Hi Stephanie,

There are two types of files: executables and text files. If the file is classified as an executable (and its my understanding that only EXE and DLL are executables), then its Version based (though there is more to it than just that. See the link below.

Text files aren't versioned, they are hashed. So if the file has not changed it has the same hash and won't be updated. Look at this:
https://na01.safelinks.protection.outlook.com/?url=
http%3a%2f%2fmsdn.microsoft.com%2fen-us%2flibrary%
2faa368267(v%3dvs.85).aspx&data=02%7c01%7cv-stlutz%40microsoft.com%
7c1071d98fc32e47854acb08d3bcb6c20d%7c72f988bf86f141af91ab2d7cd011
db47%7c1%7c0%7c636059465522644774&sdata=wSKLhgKLBk%2fXDferAeQ7KSLt0ev9vaXAP%
2fS2nwjXoC8%3d

Warm regards

Rob Goodridge | CloudArchitect | LANSA Product Centre

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Charles Gallo [9Dots Management]
Sent: Thursday, 4 August 2016 10:37 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Patch installation

Question - on NON executable object (in particular, XLAM files - which really ARE executable) how do they do versioning?  Interestingly, if you look, the version is always XX.XX.XX - I tend to put the version in the tag

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Robert Goodridge
Sent: Thursday, August 04, 2016 12:37 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Patch installation

Hi Stephanie,

Executable objects are installed based on the Version number in the executable being greater than the currently installed version of the executable. That's it. No workarounds, Its not date based or difference based. Just version. This is a Windows Installer behaviour, not WiX.
<snip>

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fna01.safelinks&data=02%7c01%7cv-stlutz%40microsoft.com%7c4c71e4cfbc664714523708d3bf57102e%7c72f988bf86f141af91ab2d7cd011db47%7c1%7c0%7c636062353070873681&sdata=Lcw66UojwV7sUxGy0VHF1Ag8n%2bdeeUcuSlEzqoLodMA%3d.
protection.outlook.com/?url=http%3a%2f%2fwww.firegiant.
com%2f&data=02%7c01%7cv-stlutz%40microsoft.com%
7c1071d98fc32e47854acb08d3bcb6c20d%7c72f988bf86f141af91ab2d7cd011
db47%7c1%7c0%7c636059465522644774&sdata=AV0%2bAtAkRR8h72%
2bYIRM0crYPfPCCrzZD31k8K31vBig%3d

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fna01.safelinks&data=02%7c01%7cv-stlutz%40microsoft.com%7c4c71e4cfbc664714523708d3bf57102e%7c72f988bf86f141af91ab2d7cd011db47%7c1%7c0%7c636062353070873681&sdata=Lcw66UojwV7sUxGy0VHF1Ag8n%2bdeeUcuSlEzqoLodMA%3d.
protection.outlook.com/?url=http%3a%2f%2fwww.firegiant.
com%2f&data=02%7c01%7cv-stlutz%40microsoft.com%
7c1071d98fc32e47854acb08d3bcb6c20d%7c72f988bf86f141af91ab2d7cd011
db47%7c1%7c0%7c636059465522644774&sdata=AV0%2bAtAkRR8h72%
2bYIRM0crYPfPCCrzZD31k8K31vBig%3d

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.firegiant.com%2f&data=02%7c01%7cv-stlutz%40microsoft.com%7c4c71e4cfbc664714523708d3bf57102e%7c72f988bf86f141af91ab2d7cd011db47%7c1%7c0%7c636062353070873681&sdata=TkQqGhvPEcD6aV5Zvrw7jRKPBNefwlsjn5VIozGfbVM%3d

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.firegiant.com%2f&data=02%7c01%7cv-stlutz%40microsoft.com%7c4c71e4cfbc664714523708d3bf57102e%7c72f988bf86f141af91ab2d7cd011db47%7c1%7c0%7c636062353070883689&sdata=OtWetxxqyicw5%2b8qSPc%2biJOxpRG2JZ3ZgU0bf2ZPGiY%3d

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.firegiant.com%2f&data=02%7c01%7cv-stlutz%40microsoft.com%7c4c71e4cfbc664714523708d3bf57102e%7c72f988bf86f141af91ab2d7cd011db47%7c1%7c0%7c636062353070883689&sdata=OtWetxxqyicw5%2b8qSPc%2biJOxpRG2JZ3ZgU0bf2ZPGiY%3d

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.firegiant.com%2f&data=02%7c01%7cv-stlutz%40microsoft.com%7c4c71e4cfbc664714523708d3bf57102e%7c72f988bf86f141af91ab2d7cd011db47%7c1%7c0%7c636062353070883689&sdata=OtWetxxqyicw5%2b8qSPc%2biJOxpRG2JZ3ZgU0bf2ZPGiY%3d


More information about the wix-users mailing list