Patch Element

Windows Installer XML (WiX) v3.0

Patch Element

Description
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
None
Parents
Wix
Inner Text
None
Children
Sequence (min: 1, max: 1)
  1. Choice of elements (min: 0, max: unbounded)
Attributes
Name Type Description Required
AllowRemoval YesNoType Whether this is an uninstallable patch.  
ApiPatchingSymbolNoFailuresFlag YesNoType Flag used when creating a binary file patch. Default is "no". Don't fail patch due to imagehlp failures.  
ApiPatchingSymbolNoImagehlpFlag YesNoType Flag used when creating a binary file patch. Default is "no". Don't use imagehlp.dll.  
ApiPatchingSymbolUndecoratedTooFlag YesNoType Flag used when creating a binary file patch. Default is "no". After matching decorated symbols, try to match remaining by undecorated names.  
Classification PatchClassificationType Category of updates. Yes
ClientPatchId String An easily referenced identity unique to a patch that can be used in product authoring. See remarks for more information.  
Codepage String The code page integer value or web name for the resulting MSP. See remarks for more information.  
Comments String Optional comments for browsing.  
Description String Description of the patch. Yes
DisplayName String A title for the patch that is suitable for public display. In Add/Remove Programs from XP SP2 on. Yes
Id AutogenGuid Patch code for this patch.  
Manufacturer String Vendor releasing the package  
MinorUpdateTargetRTM YesNoType 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.  
MoreInfoURL String A URL that provides information specific to this patch. In Add/Remove Programs from XP SP2 on.  
OptimizedInstallMode YesNoType 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.  
OptimizePatchSizeForLargeFiles YesNoType When this attribute is set, patches for files greater than approximately 4 MB in size may be made smaller.  
TargetProductName String Name of the application or target product suite.  
Remarks

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.

See Also
Wix Schema