Skip to main content
Version: v3

Patch Element

The Patch element is analogous to the main function in a C program. When linking, only one Patch section can be given to the linker to produce a successful result. Using this element creates an MSP file.
Windows Installer references
Inner Text
Sequence (min: 1, max: 1)
  1. Choice of elements (min: 0, max: unbounded)
    • Media (min: 1, max: unbounded)
    • OptimizeCustomActions (min: 0, max: 1): Indicates whether custom actions can be skipped when applying the patch.
    • PatchFamily (min: 1, max: unbounded)
    • PatchFamilyGroup (min: 1, max: unbounded)
    • PatchFamilyGroupRef (min: 0, max: unbounded)
    • PatchFamilyRef (min: 0, max: unbounded)
    • PatchInformation (min: 0, max: 1): Optional element that allows overriding summary information properties.
    • PatchProperty (min: 0, max: unbounded)
    • TargetProductCodes (min: 0, max: unbounded)
    • Any Element (namespace='##other' processContents='Lax') Extensibility point in the WiX XML Schema. Schema extensions can register additional elements at this point in the schema.
AllowRemovalYesNoTypeWhether this is an uninstallable patch. 
ApiPatchingSymbolNoFailuresFlagYesNoTypeFlag used when creating a binary file patch. Default is "no". Don't fail patch due to imagehlp failures. 
ApiPatchingSymbolNoImagehlpFlagYesNoTypeFlag used when creating a binary file patch. Default is "no". Don't use imagehlp.dll. 
ApiPatchingSymbolUndecoratedTooFlagYesNoTypeFlag used when creating a binary file patch. Default is "no". After matching decorated symbols, try to match remaining by undecorated names. 
ClassificationStringCategory of updates. Recommended values are Critical Update, Hotfix, Security Rollup, Security Update, Service Pack, Update, Update Rollup.Yes
ClientPatchIdStringAn easily referenced identity unique to a patch that can be used in product authoring. See remarks for more information. 
CodepageStringThe code page integer value or web name for the resulting MSP. See remarks for more information. 
CommentsStringOptional comments for browsing. 
DescriptionStringDescription of the patch.Yes
DisplayNameStringA title for the patch that is suitable for public display. In Add/Remove Programs from XP SP2 on.Yes
IdAutogenGuidPatch code for this patch. 
ManufacturerStringVendor releasing the package 
MinorUpdateTargetRTMYesNoType Indicates that the patch targets the RTM version of the product or the most recent major upgrade patch. Author this optional property in minor update patches that contain sequencing information to indicate that the patch removes all patches up to the RTM version of the product, or up to the most recent major upgrade patch. This property is available beginning with Windows Installer 3.1.  
MoreInfoURLStringA URL that provides information specific to this patch. In Add/Remove Programs from XP SP2 on. 
OptimizedInstallModeYesNoType If this attribute is set to 'yes' in all the patches to be applied in a transaction, the application of the patch is optimized if possible. Available beginning with Windows Installer 3.1.  
OptimizePatchSizeForLargeFilesYesNoTypeWhen this attribute is set, patches for files greater than approximately 4 MB in size may be made smaller. 
TargetProductNameStringName of the application or target product suite. 

You can specify any valid Windows code by by integer like 1252, or by web name like Windows-1252. See Code Pages for more information.

The ClientPatchId attribute allows you to specify an easily referenced identity that you can use in product authoring. This identity prefixes properties added by WiX to a patch transform, such as ClientPatchId.PatchCode and ClientPatchId.AllowRemoval. If the patch code GUID is auto-generated you could not reference any properties using this auto-generated prefix.

For example, if you were planning to ship a patch referred to as "QFE1" and needed to write your own registry values for Add/Remove Programs in product authoring such as the UninstallString for this patch, you could author a RegistryValue with the name UninstallString and the value

[SystemFolder]msiexec.exe /package [ProductCode] /uninstall [QFE1.PatchCode]
. In your patch authoring you would then set ClientPatchId to "QFE1" and WiX will add the QFE1.PatchCode property to the patch transform when the patch is created. If the Id attribute specified the patch code to be generated automatically, you could not reference the prefix.PatchCode property as shown above.

The summary information is automatically populated from attribute values of the Patch element including the code page. If you want to override some of these summary information properties or use a different code page for the summary information itself, author the PatchInformation element.

See Also
Wix Schema