Skip to main content

PatchPackage Class

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

Methods

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.

Properties

PropertyDescription
PatchCodeGets the patch code (GUID) of the patch package.

Events

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

WixToolset.Dtf.WindowsInstaller.Package.dll version 5.0.2+aa65968c419420d32e3e1b647aea0082f5ca5b78

ExtractTransform(transform, extractFile) Method

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

Declaration

public void ExtractTransform(
string transform,
string extractFile
)

Parameters

ParameterTypeDescription
transformstringName of the transform to extract; this may optionally be a special transform prefixed by "#"
extractFilestringLocation where the transform will be extracted

GetReplacedPatchCodes() Method

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

Declaration

public System.String[] GetReplacedPatchCodes()

Return value

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

Remarks

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

GetTargetProductCodes() Method

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

Declaration

public System.String[] GetTargetProductCodes()

Return value

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

Remarks

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

GetTransformInfo(transform) Method

Gets information about a transforms included in the patch package.

Declaration

public TransformInfo GetTransformInfo(
string transform
)

Parameters

ParameterTypeDescription
transformstringName of the transform to extract; this may optionally be a special transform prefixed by "#"

Return value

TransformInfo Information about the transform

GetTransforms() Method

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

Declaration

public System.String[] GetTransforms()

Return value

System.String[] Array of transform names

Remarks

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

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

Declaration

public System.String[] GetTransforms(
bool includeSpecialTransforms
)

Parameters

ParameterTypeDescription
includeSpecialTransformsboolSpecifies whether to include the "patch special transforms" that are prefixed with "#"

Return value

System.String[] Array of transform names

Remarks

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

GetTransformsInfo() Method

Gets information about the transforms included in the patch package.

Declaration

public TransformInfo[] GetTransformsInfo()

Return value

TransformInfo[] Array containing information about each transform

Remarks

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

GetTransformsInfo(includeSpecialTransforms) Method

Gets information about the transforms included in the patch package.

Declaration

public TransformInfo[] GetTransformsInfo(
bool includeSpecialTransforms
)

Parameters

ParameterTypeDescription
includeSpecialTransformsboolSpecifies whether to include the "patch special transforms" that are prefixed with "#"

Return value

TransformInfo[] Array containing information about each transform

GetValidTransforms(installPackage) Method

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

Declaration

public System.String[] GetValidTransforms(
InstallPackage installPackage
)

Parameters

ParameterTypeDescription
installPackageInstallPackageThe install package to validate the transforms against

Return value

System.String[] Array of valid transform names

Remarks

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.

LogMessage(format, args) Method

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

Declaration

protected void LogMessage(
string format,
System.Object[] args
)

Parameters

ParameterTypeDescription
formatstringMessage string, containing 0 or more format items
argsSystem.Object[]Items to be formatted

PatchCode Property

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

Declaration

public string PatchCode { get; set; } 

Remarks

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

Message Event

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

Declaration

public InstallPackageMessageHandler Message

Value

InstallPackageMessageHandler