The MsiApplyMultiplePatches function applies one or more patches to products eligible to receive the patches. The MsiApplyMultiplePatches function sets the PATCH property with a list of patches delimited by semicolons and invokes the patching of the target products. Other properties can be set using a properties list.
Syntax
C++UINT MsiApplyMultiplePatches(
__in LPCTSTR szPatchPackages,
__in_opt LPCTSTR szProductCode,
__in_opt LPCTSTR szPropertiesList
);
Parameters
- szPatchPackages [in]
-
A semicolon-delimited list of the paths to patch files as a single string. For example: ""c:\sus\download\cache\Office\sp1.msp; c:\sus\download\cache\Office\QFE1.msp; c:\sus\download\cache\Office\QFEn.msp" "
- szProductCode [in, optional]
-
This parameter is the ProductCode GUID of the product to be patched. The user or application calling MsiApplyMultiplePatches must have privileges to apply patches. When this parameter is null, the patches are applied to all eligible products. When this parameter is non-null, the patches are applied only to the specified product.
- szPropertiesList [in, optional]
-
A null-terminated string that specifies command–line property settings used during the patching of products. If there are no command–line property settings, pass in a NULL pointer. An empty string is an invalid parameter. These properties are shared by all target products. For more information, see About Properties and Setting Public Property Values on the Command Line.
Note The properties list should not contain the PATCH property. If the PATCH property is set in the command line the value is ignored and is overwritten with the patches being applied.
Return Value
The MsiApplyMultiplePatches function returns the following values.
Value | Meaning |
---|---|
|
Some arguments passed in are incorrect or contradicting. |
|
The function completed and all products are successfully patched. ERROR_SUCCESS is returned only if all the products eligible for the patches are patched successfully. If none of the new patches are applicable, MsiApplyMultiplePatches returns ERROR_SUCCESS and product state remains unchanged. |
|
The restart initiated by the last transaction terminated this call to MsiApplyMultiplePatches. All the target products may not have been patched. |
|
The restart required by the last transaction terminated this call to MsiApplyMultiplePatches. All target products may not have been patched. |
|
One of the patch packages provide could not be opened. |
|
One of the patch packages provide is not a valid one. |
|
One of the patch packages is unsupported. |
|
Implies possible partial completion or that one or more transactions failed. |
Remarks
Windows Installer 2.0: Not supported. This function is available beginning with Windows Installer 3.0.
Requirements
Version | Windows Installer 5.0 on Windows Server 2008 R2 or Windows 7. Windows Installer 4.0 or Windows Installer 4.5 on Windows Server 2008 or Windows Vista. Windows Installer 3.0 or later on Windows Server 2003, Windows XP, and Windows 2000. See the Windows Installer Run-Time Requirements for information about the minimum Windows service pack that is required by a Windows Installer version. |
---|---|
Header | Msi.h |
Library | Msi.lib |
DLL | Msi.dll |
Unicode and ANSI names | MsiApplyMultiplePatchesW (Unicode) and MsiApplyMultiplePatchesA (ANSI) |
See Also
- About Properties
- Setting Public Property Values on the Command Line
- PATCH
- ProductCode
- Multiple-Package Installations
Send comments about this topic to Microsoft
Build date: 8/13/2009
© 2009 Microsoft Corporation. All rights reserved.