New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Burn: Patches fail to install when multiple patches present #5851

Closed
GregDomjan opened this Issue Jul 18, 2018 · 8 comments

Comments

Projects
None yet
3 participants
@GregDomjan
Copy link

GregDomjan commented Jul 18, 2018

Bug? Seemed related to #3538 Burn:patches with same version breaks DetectTargetMsiPackage

  • Which version of WiX are you building with?
    3.11.0

  • Visual Studio to build burn/BA.dll
    2017 15.6

  • If the problem occurs when installing your packages built with WiX, what is the version of Windows the package is running on?
    Windows 10

  • Describe the problem and the steps to reproduce it.

Burn package reports success but fails to install MSP from chain if the suitable MSP is after first 2 listed in chain (16 MSP listed 64/32 bit then by en/de/fr/es/jp ...) where ProductID should match
So we can patch EN 64 but DE 64 fails.
Running the DE 64 msp directly works.

debugging burn vpfnMsiDetermineApplicablePatchesW pPatchInfo

For EN 64 
  Item 0
    dwOrder = 0
    uStatus = 0
  Item 1
    dwOrder = -1
    uStatus = 1642
  Item 2-15
    dwOrder = -1
    uStatus = 87
For DE 64
  Item 0/1
    dwOrder = -1
    uStatus = 1642
  Item 2-15
    dwOrder = -1
    uStatus = 87

Re ordering the chain so that the 1 or both MSP for DE come before the 2 for EN, EN 64 then fails with uStatus 1642
So it seems only first MSP in chain can be installed.

Unclear on referring to doc, does 87 mean invalid parm, and how to fix
https://docs.microsoft.com/en-us/windows/desktop/api/msi/nf-msi-msidetermineapplicablepatchesa
https://docs.microsoft.com/en-us/windows/desktop/msi/error-codes

  • Describe the behavior you expected and how it differed from the actual behavior.

Burn should be able to match installed package with MSP in chain and have MSP installation run.

MSP evaluated for install against packages could be reduced to just those with suitable conditions?

@GregDomjan GregDomjan changed the title Burn: Patches fail to install Burn: Patches fail to install when multiple patches present Jul 18, 2018

@barnson

This comment has been minimized.

Copy link
Member

barnson commented Jul 18, 2018

Please attach your WiX authoring and bundle log showing the results.

@GregDomjan

This comment has been minimized.

Copy link

GregDomjan commented Jul 20, 2018

en-log.zip
de-log.zip
Source sample.zip
it0010 wixlib with guids, msi and bundle of msi,
it0011 msi with version increment, msp patch, bundle of msp.
Compiled sample demo.zip

@barnson barnson added the notabug label Jul 20, 2018

@barnson

This comment has been minimized.

Copy link
Member

barnson commented Jul 20, 2018

Your EN and DE patches have the same patch code, so they collide. They need unique patch codes.

@barnson barnson closed this Jul 20, 2018

@GregDomjan

This comment has been minimized.

Copy link

GregDomjan commented Jul 23, 2018

Thanks for the feedback @barnson , which do you mean for patch code?
The Product@Id differs, the Product@UpgradeCode doesn't, so I guess you mean Product@UpgradeCode.
<Product Name='Foobar' Id='$(var.ProdCode)' UpgradeCode='00000001-7349-453F-94F6-BCB5110BA4FD'

Calculating patch applicability for target product code:

EN {96B01033-32E2-41B9-AF5A-46598ACBEB89}  (1033)
DE {96B01031-32E2-41B9-AF5A-46598ACBEB89}  (1031)
@GregDomjan

This comment has been minimized.

Copy link

GregDomjan commented Jul 23, 2018

Making the Product@UpgradeCode unique for each language and 32/64 didn't change anything.

@barnson

This comment has been minimized.

Copy link
Member

barnson commented Jul 23, 2018

Patch code is Patch/@Id and auto-generated by default.

@GregDomjan

This comment has been minimized.

Copy link

GregDomjan commented Jul 23, 2018

@barnson so perhaps instead I need to raise a feature enhancement issue for Candle, when I try to provide an id through wxl, I get the error

cmd.exe /X /C "C:\it\it0011-multi-module-patch\msp\target\wix-tools\bin\candle.exe -dIsWin64=no -dnarDir.dll=x86-Windows-msvc-shared/lib/x86-Windows-msvc/shared -dnarDir.exe=x86-Windows-msvc-executable/bin/x86-Windows-msvc -dcom.github.wix-maven.it.msi.UnpackPath=com.github.wix-maven.it-msi-0.0.2-SNAPSHOT -dConfiguration=Release -out C:\it\it0011-multi-module-patch\msp\target\wixobj\Release\x86\ -dOutDir=C:\it\it0011-multi-module-patch\msp\target\wixobj\Release\ -arch x86 -dPlatform=x86 -dProjectDir=C:\it\it0011-multi-module-patch\msp\ -dProjectId=msp "-dProjectName=IT0011/msp - test msp lifecycle" src\main\wix\Patch.wxs"
Windows Installer XML Toolset Compiler version 3.11.0.1701
Copyright (c) .NET Foundation and contributors. All rights reserved.

Patch.wxs
candle.exe : error CNDL0001 : Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

Following similar pattern to msi so that the id changes for each platform and locale

  <?if $(var.Platform)="x64"?>
  <?define PatchCode=!(loc.PatchCode32) ?>
  <?else?>
  <?define PatchCode=!(loc.PatchCode64) ?>
  <?endif?>
  
	<Patch Id="$(var.PatchCode)"
		AllowRemoval="no"

Did I miss something, known limitation?

@robmen

This comment has been minimized.

Copy link
Member

robmen commented Jul 24, 2018

For support please contact the wix-users mailing list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment