MsiInstallMissingComponent

[This is preliminary documentation and subject to change.]

The MsiInstallMissingComponent function installs files that are unexpectedly missing.

UINT MsiInstallMissingComponent(
  LPCTSTR szProduct,           // product code
  LPCTSTR szComponent,         // component ID
  INSTALLSTATE eInstallState   // install type
);
 

Parameters

szProduct
Specifies the product code for the product that owns the component to be installed.
szComponent
Identifies the component to be installed.
eInstallState
Specifies the way the component should be installed. This parameter must be one of the following values.
Value Meaning
INSTALLSTATE_LOCAL The component should be locally installed.
INSTALLSTATE_SOURCE The component should be installed to run from the source.
INSTALLSTATE_DEFAULT The component should be installed according to the installer defaults.

Return Values

ERROR_BAD_CONFIGURATION
The configuration information is corrupt.
ERROR_INSTALL_FAILURE
The installation failed.
ERROR_INSTALL_SOURCE_ABSENT
The source was unavailable.
ERROR_INSTALL_SUSPEND
The installation was suspended.
ERROR_INSTALL_USEREXIT
The user exited the installation.
ERROR_INVALID_PARAMETER
One of the parameters is invalid.
ERROR_SUCCESS
The function completed successfully.
ERROR_UNKNOWN_PRODUCT
The product code is unrecognized.

Remarks

The MsiInstallMissingComponent function resolves the feature(s) that the component belongs to. Then, the product feature that requires the least additional disk space is installed.

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.