MsiReinstallProduct

[This is preliminary documentation and subject to change.]

The MsiReinstallProduct function validates or corrects installation problems in products.

INSTALLSTATE MsiReinstallProduct(
  LPCTSTR szProduct,        // product code
  DWORD dwReinstallMode     // one or more REINSTALLMODE modes
);
 

Parameters

szProduct
Specifies the product code for the product to be reinstalled.
dwReinstallMode
Specifies the reinstall mode. This parameter can be one or more of the following values.
Value Meaning
REINSTALLMODE_REPAIR Repair any defects encountered.
REINSTALLMODE_FILEMISSING Reinstall only if the file is missing.
REINSTALLMODE_FILEOLDERVERSION Reinstall if the file is missing or is an older version.
REINSTALLMODE_FILEEQUALVERSION Reinstall if the file is missing or is an equal or older version.
REINSTALLMODE_FILEEXACT Reinstall if the file is missing or is not an exact version.
REINSTALLMODE_FILEVERIFY Check sum executables, and reinstall if they are missing or corrupt.
REINSTALLMODE_FILEREPLACE Reinstall all the files regardless of version.
REINSTALLMODE_USERDATA Insure required user regular entries.
REINSTALLMODE_MACHINEDATA Insure required machine regular entries.
REINSTALLMODE_SHORTCUT Validate shortcuts and progman items.

Return Values

ERROR_INSTALL_FAILURE
The installation failed.
ERROR_INVALID_PARAMETER
An invalid parameter was passed to the function.
ERROR_INSTALL_SERVICE_FAILURE
The installation service could not be accessed.
ERROR_INSTALL_SUSPEND
The installation was suspended and is incomplete.
ERROR_INSTALL_USEREXIT
The user canceled the installation.
ERROR_SUCCESS
The function completed successfully.
ERROR_UNKNOWN_PRODUCT
The product code does not identify a known product.

Remarks

The MsiReinstallProduct function typically validates or corrects installations.

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.

See Also

Installation and Configuration Functions