Skip to content

PatchPackage Class

Provides access to convenient properties and operations on a patch package (.MSP).

MethodDescription
ExtractTransform(transform, extractFile)Extracts a transform (.MST) from a patch package.
GetReplacedPatchCodes()Gets the list of patch codes that are replaced by this patch package.
GetTargetProductCodes()Gets the list of product codes of products targeted by this patch package.
GetTransformInfo(transform)Gets information about a transforms included in the patch package.
GetTransforms()Gets the names of the transforms included in the patch package.
GetTransforms(includeSpecialTransforms)Gets the names of the transforms included in the patch package.
GetTransformsInfo()Gets information about the transforms included in the patch package.
GetTransformsInfo(includeSpecialTransforms)Gets information about the transforms included in the patch package.
GetValidTransforms(installPackage)Analyzes the transforms included in the patch package to find the ones that are applicable to an install package.
LogMessage(format, args)Sends a message to the «see E:WixToolset.Dtf.WindowsInstaller.Package.PatchPackage.Message» event-handler.
PropertyDescription
PatchCodeGets the patch code (GUID) of the patch package.
EventDescription
MessageHandle this event to receive status messages when operations are performed on the patch package.
WixToolset.Dtf.WindowsInstaller.Package.dll version 5.0.0+41e11442b2ca93e444b60213b5ae99dcbab787d8

ExtractTransform(transform, extractFile) Method

Section titled “ExtractTransform(transform, extractFile) Method”

Extracts a transform (.MST) from a patch package.

public void ExtractTransform(
string transform,
string extractFile
)
ParameterTypeDescription
transformstringName of the transform to extract; this may optionally be a special transform prefixed by ”#“
extractFilestringLocation where the transform will be extracted

Gets the list of patch codes that are replaced by this patch package.

public System.String[] GetReplacedPatchCodes()

System.String[] Array of replaced patch codes (GUIDs)

The list of replaced patch codes is stored in the RevisionNumber field of the patch summary information.

Gets the list of product codes of products targeted by this patch package.

public System.String[] GetTargetProductCodes()

System.String[] Array of product codes (GUIDs)

The list of target product codes is stored in the Template field of the patch summary information.

Gets information about a transforms included in the patch package.

public TransformInfo GetTransformInfo(
string transform
)
ParameterTypeDescription
transformstringName of the transform to extract; this may optionally be a special transform prefixed by ”#“

TransformInfo Information about the transform

Gets the names of the transforms included in the patch package.

public System.String[] GetTransforms()

System.String[] Array of transform names

The returned list does not include the “patch special transforms” that are prefixed with ”#“The list of transform names is stored in the LastSavedBy field of the patch summary information.

GetTransforms(includeSpecialTransforms) Method

Section titled “GetTransforms(includeSpecialTransforms) Method”

Gets the names of the transforms included in the patch package.

public System.String[] GetTransforms(
bool includeSpecialTransforms
)
ParameterTypeDescription
includeSpecialTransformsboolSpecifies whether to include the “patch special transforms” that are prefixed with ”#“

System.String[] Array of transform names

The list of transform names is stored in the LastSavedBy field of the patch summary information.

Gets information about the transforms included in the patch package.

public TransformInfo[] GetTransformsInfo()

TransformInfo[] Array containing information about each transform

The returned info does not include the “patch special transforms” that are prefixed with ”#“

GetTransformsInfo(includeSpecialTransforms) Method

Section titled “GetTransformsInfo(includeSpecialTransforms) Method”

Gets information about the transforms included in the patch package.

public TransformInfo[] GetTransformsInfo(
bool includeSpecialTransforms
)
ParameterTypeDescription
includeSpecialTransformsboolSpecifies whether to include the “patch special transforms” that are prefixed with ”#“

TransformInfo[] Array containing information about each transform

Analyzes the transforms included in the patch package to find the ones that are applicable to an install package.

public System.String[] GetValidTransforms(
InstallPackage installPackage
)
ParameterTypeDescription
installPackageInstallPackageThe install package to validate the transforms against

System.String[] Array of valid transform names

The returned list does not include the “patch special transforms” that are prefixed with ”#” If a transform is valid, then its corresponding special transform is assumed to be valid as well.

Sends a message to the «see E:WixToolset.Dtf.WindowsInstaller.Package.PatchPackage.Message» event-handler.

protected void LogMessage(
string format,
System.Object[] args
)
ParameterTypeDescription
formatstringMessage string, containing 0 or more format items
argsSystem.Object[]Items to be formatted

Gets the patch code (GUID) of the patch package.

public string PatchCode { get; set; }

The patch code is stored in the RevisionNumber field of the patch summary information.

Handle this event to receive status messages when operations are performed on the patch package.

public InstallPackageMessageHandler Message

InstallPackageMessageHandler