Platform SDK: Windows Installer

Installer Function Reference

To enable the Microsoft� Windows� Installer in your application, you must use the installation functions. The following is a list of these functions by category.

User Interface and Logging Functions

Function name Brief description of function
MsiSetInternalUI Enables the installer's internal user interface.
MsiSetExternalUI Enables an external user-interface handler.
MsiEnableLog Sets the log mode for all installations in the calling process.

Handle Management Functions

Function name Brief description of function
MsiCloseHandle Closes an open installation handle.
MsiCloseAllHandles Closes all open installation handles. Not to be used for cleanup.

Installation and Configuration Functions

Function name Brief description of function
MsiAdvertiseProduct Advertises a product. Available with Windows Installer version 2.0 or later.
MsiAdvertiseProductEx Advertises a product. Available with Windows Installer version 2.0 or later.
MsiAdvertiseScript Copies an advertise script file into the specified locations. Available with Windows Installer version 2.0 or later.
MsiInstallProduct Installs or removes an application or application suite.
MsiConfigureProduct Installs or removes an application or application suite.
MsiConfigureProductEx Installs or removes an application or application suite. A product command line may be specified.
MsiReinstallProduct Reinstalls or repairs an installation.
MsiConfigureFeature Configures the installed state of a feature.
MsiReinstallFeature Validates or repairs features.
MsiInstallMissingComponent Installs missing components.
MsiInstallMissingFile Installs missing files.
MsiProcessAdvertiseScript Processes an advertise script file into the specified locations. Available with Windows Installer version 2.0 or later.
MsiSourceListAddSource Adds a source to the list of network sources.
MsiSourceListClearAll Removes all network sources from the source list.
MsiSourceListForceResolution Forces the installer to search the source list to locate a source.

Component-Specific Functions

Function name Brief description of function
MsiProvideAssembly Installs and returns the full component path for an assembly.
MsiProvideComponent Installs and returns full component path of a component.
MsiProvideQualifiedComponent Installs and returns full component path of a qualified component.
MsiProvideQualifiedComponentEx Installs and returns full component path of a qualified component that is published by a product.
MsiGetComponentPath Returns full path or registry key to an installed component.
MsiLocateComponent Returns full path to an installed component without a product code.

Application-Only Functions

Function name Brief description of function
MsiCollectUserInfo Stores user information from an installation wizard.
MsiUseFeature Increments usage count for a feature and indicates installation state.
MsiUseFeatureEx Increments usage count for a feature and indicates installation state.
MsiGetProductCode Returns product code using the component code.

System Status Functions

Function name Brief description of function
MsiEnumProducts Enumerates advertised products.
MsiEnumRelatedProducts Enumerates currently installed products having a specified upgrade code.
MsiEnumFeatures Enumerates published features.
MsiEnumComponents Enumerates the installed components.
MsiEnumClients Enumerates the clients of an installed component.
MsiEnumComponentQualifiers Enumerates the advertised qualifiers for a component.
MsiQueryFeatureState Returns the installed state of a feature.
MsiQueryProductState Returns the installed state for an application or application suite.
MsiGetFeatureUsage Returns usage metrics for a feature.
MsiGetProductInfo Returns product information for published and installed products.
MsiGetUserInfo Returns registered user information for an installed product.

Product Query Functions

Function name Brief description of function
MsiOpenProduct Opens a product for use with the functions that access the database.
MsiOpenPackage Opens a package for use with the functions that access the database.
MsiOpenPackageEx Opens a package for use with the functions that access the database. Available with Windows Installer version 2.0 or later.
MsiIsProductElevated Checks whether the product is installed with elevated privileges. Available with Windows Installer version 2.0 or later.
MsiGetProductInfoFromScript Returns product information for an installer script file. available with Windows Installer version 2.0 or later.
MsiGetProductProperty Retrieves properties in the product database.
MsiGetShortcutTarget Examines a shortcut and returns its product, feature name, and component if available. Available in Windows Installer version 1.1 and later versions.
MsiGetFeatureInfo Returns descriptive information for a feature.
MsiVerifyPackage Verifies that the specified file is an installation package.

Patching Functions

Function name Brief description of function
MsiApplyPatch Invokes an installation and applies a patch package.
MsiEnumPatches Returns the GUID for each patch that has been applied to a product and a list of transforms from each patch that apply to the product.
MsiGetPatchInfo Returns information about a patch.

File Query Functions

Function name Brief description of function
MsiGetFileHash Takes the path to a file and returns a 128-bit hash of that file. Available with Windows Installer version 2.0 and later versions.
MsiGetFileSignatureInformation Takes the path to a file that has been digitally signed and returns the file's signer certificate and hash. Available with Windows Installer version 2.0 and later versions.
MsiGetFileVersion Returns the version string and language string.

Database Functions

In addition to the installer functions listed above, you can manipulate information in the installation database by using the database access functions described in the Database Functions section.

Platform SDK Release: August 2001