MsiApplyPatch

[This is preliminary documentation and subject to change.]

For each product listed by the patch package as eligible to receive the patch, the MsiApplyPatch function invokes an installation and sets the PATCH property to the path of the patch package.

UINT WINAPI MsiApplyPatch(
  LPCTSTR szPatchPackage,      // location of the patch package
  LPCTSTR szInstallPackage,    // location of product to be patched 
                                // <optional>
  INSTALLTYPE eInstallType,     // type of install to patch
  LPCTSTR szCommandLine        // command line <property settings>
); 
 

Parameters

szPatchPackage
Specifies the full path to the patch package.
szInstallPackage
Specifies a path to a product to be patched. This is an optional parameter and if omitted the patch is applied to every product listed in the patch package as eligible to receive the patch.
eInstallType
This parameter specifies the type of installation to patch. A value of 1 for INSTALLTYPE_NETWORK_IMAGE sets this for a network installation. The eInstallType parameter is ignored if szInstallPackage is omitted.
Type of Installation Meaning
INSTALLTYPE_NETWORK_IMAGE Indicates a network installation

szCommandLine
Specifies command line property settings.

Return Values

ERROR_SUCCESS
The function completed successfully.
ERROR_INSTALL_PACKAGE*
These errors may indicate an error with the patch package or the install package.
Any Action Error
An error relating to an action occurred.
Any Initialization Error
An error relating to initialization occurred.

QuickInfo

  Windows NT: Requires version 4.0 or later. Available as a redistributable for Windows NT 4.0.
  Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in msi.h.
  Import Library: Use msi.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT.