Expand Minimize

MsiApplyMultiplePatches function

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


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.

ValueMeaning
ERROR_INVALID_PARAMETER

Some arguments passed in are incorrect or contradicting.

ERROR_SUCCESS

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.

ERROR_SUCCESS_REBOOT_INITIATED

The restart initiated by the last transaction terminated this call to MsiApplyMultiplePatches. All the target products may not have been patched.

ERROR_SUCCESS_REBOOT_REQUIRED

The restart required by the last transaction terminated this call to MsiApplyMultiplePatches. All target products may not have been patched.

ERROR_PATCH_PACKAGE_OPEN_FAILED

One of the patch packages provide could not be opened.

ERROR_PATCH_PACKAGE_INVALID

One of the patch packages provide is not a valid one.

ERROR_PATCH_PACKAGE_UNSUPPORTED

One of the patch packages is unsupported.

Any error in Winerror.h

Implies possible partial completion or that one or more transactions failed.

 

Requirements

Version

Windows Installer 5.0 on Windows Server 2012, Windows 8, 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 or Windows XP. 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
Not Supported in Windows Installer 2.0 and earlier

 

 

Community Additions

ADD
Show:
© 2014 Microsoft