PatchPackage Class
Provides access to convenient properties and operations on a patch package (.MSP).
Methods
Section titled “Methods”| Method | Description |
|---|---|
| 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
Section titled “Properties”| Property | Description |
|---|---|
| PatchCode | Gets the patch code (GUID) of the patch package. |
Events
Section titled “Events”| Event | Description |
|---|---|
| Message | Handle 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.
Declaration
Section titled “Declaration”public void ExtractTransform( string transform, string extractFile)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| transform | string | Name of the transform to extract; this may optionally be a special transform prefixed by ”#“ |
| extractFile | string | Location where the transform will be extracted |
GetReplacedPatchCodes() Method
Section titled “GetReplacedPatchCodes() Method”Gets the list of patch codes that are replaced by this patch package.
Declaration
Section titled “Declaration”public System.String[] GetReplacedPatchCodes()Return value
Section titled “Return value”System.String[] Array of replaced patch codes (GUIDs)
Remarks
Section titled “Remarks”The list of replaced patch codes is stored in the RevisionNumber field of the patch summary information.
GetTargetProductCodes() Method
Section titled “GetTargetProductCodes() Method”Gets the list of product codes of products targeted by this patch package.
Declaration
Section titled “Declaration”public System.String[] GetTargetProductCodes()Return value
Section titled “Return value”System.String[] Array of product codes (GUIDs)
Remarks
Section titled “Remarks”The list of target product codes is stored in the Template field of the patch summary information.
GetTransformInfo(transform) Method
Section titled “GetTransformInfo(transform) Method”Gets information about a transforms included in the patch package.
Declaration
Section titled “Declaration”public TransformInfo GetTransformInfo( string transform)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| transform | string | Name of the transform to extract; this may optionally be a special transform prefixed by ”#“ |
Return value
Section titled “Return value”TransformInfo Information about the transform
GetTransforms() Method
Section titled “GetTransforms() Method”Gets the names of the transforms included in the patch package.
Declaration
Section titled “Declaration”public System.String[] GetTransforms()Return value
Section titled “Return value”System.String[] Array of transform names
Remarks
Section titled “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
Section titled “GetTransforms(includeSpecialTransforms) Method”Gets the names of the transforms included in the patch package.
Declaration
Section titled “Declaration”public System.String[] GetTransforms( bool includeSpecialTransforms)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| includeSpecialTransforms | bool | Specifies whether to include the “patch special transforms” that are prefixed with ”#“ |
Return value
Section titled “Return value”System.String[] Array of transform names
Remarks
Section titled “Remarks”The list of transform names is stored in the LastSavedBy field of the patch summary information.
GetTransformsInfo() Method
Section titled “GetTransformsInfo() Method”Gets information about the transforms included in the patch package.
Declaration
Section titled “Declaration”public TransformInfo[] GetTransformsInfo()Return value
Section titled “Return value”TransformInfo[] Array containing information about each transform
Remarks
Section titled “Remarks”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.
Declaration
Section titled “Declaration”public TransformInfo[] GetTransformsInfo( bool includeSpecialTransforms)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| includeSpecialTransforms | bool | Specifies whether to include the “patch special transforms” that are prefixed with ”#“ |
Return value
Section titled “Return value”TransformInfo[] Array containing information about each transform
GetValidTransforms(installPackage) Method
Section titled “GetValidTransforms(installPackage) Method”Analyzes the transforms included in the patch package to find the ones that are applicable to an install package.
Declaration
Section titled “Declaration”public System.String[] GetValidTransforms( InstallPackage installPackage)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| installPackage | InstallPackage | The install package to validate the transforms against |
Return value
Section titled “Return value”System.String[] Array of valid transform names
Remarks
Section titled “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
Section titled “LogMessage(format, args) Method”Sends a message to the «see E:WixToolset.Dtf.WindowsInstaller.Package.PatchPackage.Message» event-handler.
Declaration
Section titled “Declaration”protected void LogMessage( string format, System.Object[] args)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| format | string | Message string, containing 0 or more format items |
| args | System.Object[] | Items to be formatted |
PatchCode Property
Section titled “PatchCode Property”Gets the patch code (GUID) of the patch package.
Declaration
Section titled “Declaration”public string PatchCode { get; set; }Remarks
Section titled “Remarks”The patch code is stored in the RevisionNumber field of the patch summary information.
Message Event
Section titled “Message Event”Handle this event to receive status messages when operations are performed on the patch package.
Declaration
Section titled “Declaration”public InstallPackageMessageHandler MessageInstallPackageMessageHandler