Click to Rate and Give Feedback

  Switch on low bandwidth view
Installer Function Reference

To enable Windows Installer in your application, you must use the installer functions. The tables in this topic identify the functions by category.

User Interface and Logging Functions

NameDescription
MsiSetInternalUIEnables the internal user interface of the installer.
MsiSetExternalUIEnables an external user-interface handler that receives messages in a string format.
MsiSetExternalUIRecordEnables an external user-interface handler that receives messages in a record format.
MsiEnableLogSets the log mode for all installations in the calling process.

 

Handle Management Functions

NameDescription
MsiCloseHandleCloses an open installation handle.
MsiCloseAllHandlesCloses all open installation handles. Do not use for cleanup.

 

Installation and Configuration Functions

NameDescription
MsiAdvertiseProductAdvertises a product.
MsiAdvertiseProductExAdvertises a product.
MsiAdvertiseScriptCopies an advertise script file into specified locations.
MsiInstallProductInstalls or removes an application or application suite.
MsiConfigureProductInstalls or removes an application or application suite.
MsiConfigureProductExInstalls or removes an application or application suite. A product command-line can be specified.
MsiReinstallProductReinstalls or repairs an installation.
MsiConfigureFeatureConfigures the installed state of a feature.
MsiReinstallFeatureValidates or repairs features.
MsiInstallMissingComponentInstalls missing components.
MsiInstallMissingFileInstalls missing files.
MsiNotifySidChange Notifies and updates the Windows Installer internal information with changes to user SIDs. Available beginning with Windows Installer 3.1.
MsiProcessAdvertiseScriptProcesses an advertise script file into specified locations.
MsiSourceListAddSourceAdds or reorders the sources of a patch or product in a specified context.
MsiSourceListAddSourceExAdds or reorders the sources of a patch or product in a specified context. Creates a source list for a patch that does not exist in a specified context. Available in Windows Installer  3.0.
MsiSourceListClearSourceRemoves an existing source for a product or patch in a specified context. Available in Windows Installer  3.0.
MsiSourceListClearAllRemoves all the existing sources of a specific source type for a specified product instance.
MsiSourceListClearAllExRemoves all the existing sources of a specific source type for a specified product instance. Available in Windows Installer  3.0.
MsiSourceListForceResolutionRemoves the registration of the current source of the product or patch, which is registered as the property "LastUsedSource". This function does not affect the registered source list.
MsiSourceListForceResolutionExRemoves the registration of the current source of the product or patch, which is registered as the property "LastUsedSource". This function does not affect the registered source list. Available in Windows Installer  3.0.
MsiSourceListGetInfoRetrieves information about the source list for a product or patch in a specific context.
MsiSourceListSetInfoSets the most recently used source for a product or patch in a specified context. Available in Windows Installer  3.0.
MsiSourceListEnumMediaDisksEnumerates the list of disks registered for the media source for a patch or product. Available in Windows Installer  3.0.
MsiSourceListAddMediaDiskAdds or updates a disk of the media source of a registered product or patch. Available in Windows Installer  3.0.
MsiSourceListClearMediaDiskRemoves an existing registered disk under the media source for a product or patch in a specific context. Available in Windows Installer  3.0.
MsiSourceListEnumSourcesEnumerates the sources in the source list of a specified patch or product. Available in Windows Installer  3.0.

 

Component-Specific Functions

NameDescription
MsiProvideAssemblyInstalls and returns the full component path for an assembly.
MsiProvideComponentInstalls and returns the full component path of a component.
MsiProvideQualifiedComponentInstalls and returns the full component path of a qualified component.
MsiProvideQualifiedComponentExInstalls and returns the full component path of a qualified component that is published by a product.
MsiGetComponentPathReturns the full path or registry key to an installed component.
MsiGetComponentPathExReturns the full path or registry key to an installed component across user accounts and installation context.
Windows Installer 4.5 and earlier:  Not supported.
MsiLocateComponentReturns the full path to an installed component without a product code.
MsiQueryComponentStateReturns the installed state for a component. Can query components of an instance of a product installed under user accounts other than the current user. Available in Windows Installer  3.0 or later.

 

Application-Only Functions

NameDescription
MsiCollectUserInfoStores user information from an installation wizard.
MsiUseFeatureIncrements usage count for a feature and indicates installation state.
MsiUseFeatureExIncrements usage count for a feature and indicates installation state.
MsiGetProductCodeReturns product code using the component code.

 

System Status Functions

NameDescription
MsiEnumProductsEnumerates advertised products.
MsiEnumProductsExEnumerates through all the instances of advertised or installed products in a specified context. Available in Windows Installer  3.0 or later.
MsiEnumRelatedProductsEnumerates currently installed products having a specified upgrade code.
MsiEnumFeaturesEnumerates published features.
MsiEnumComponentsEnumerates the installed components.
MsiEnumComponentsExEnumerates the installed components across user accounts and installation context.
Windows Installer 4.5 and earlier:  Not supported.
MsiEnumClientsEnumerates the clients of an installed component.
MsiEnumClientsExEnumerates the clients of an installed component across user accounts and installation context.
Windows Installer 4.5 and earlier:  Not supported.
MsiEnumComponentQualifiersEnumerates the advertised qualifiers for a component.
MsiQueryFeatureStateReturns the installed state of a feature.
MsiQueryFeatureStateExReturns the installed state for a product feature. Can query features of an instance of a product installed under user accounts other than the current user. Available in Windows Installer  3.0 or later.
MsiQueryProductStateReturns the installed state for an application or application suite.
MsiGetFeatureUsageReturns usage metrics for a feature.
MsiGetProductInfoReturns product information for published and installed products.
MsiGetProductInfoExReturns product information for advertised and installed products. Can retrieve information on an instance of a product installed under a user account other than the current user. Available in Windows Installer  3.0 or later.
MsiGetUserInfoReturns registered user information for an installed product.

 

Product Query Functions

NameDescription
MsiOpenProductOpens a product to use with the functions that access the database.
MsiOpenPackageOpens a package to use with the functions that access the database.
MsiOpenPackageExOpens a package to use with the functions that access the database.
MsiIsProductElevatedChecks whether the product is installed with elevated privileges.
MsiGetProductInfoFromScriptReturns product information for an installer script file.
MsiGetProductPropertyRetrieves properties in the product database.
MsiGetShortcutTargetExamines a shortcut and returns its product, feature name, and component if available.
MsiGetFeatureInfoReturns descriptive information for a feature.
MsiVerifyPackageVerifies that a specified file is an installation package.

 

Patching Functions

NameDescription
MsiApplyPatchInvokes an installation and applies a patch package.
MsiEnumPatchesReturns the GUID for each patch that is applied to a product, and a list of transforms from each patch that apply to the product.
MsiGetPatchInfoReturns information about a patch.
MsiRemovePatchesUninstalls a patch from a product. Available in Windows Installer 3.0.
MsiDeterminePatchSequenceDetermines the best application sequence for a set of patches and product. Available in Windows Installer 3.0.
MsiApplyMultiplePatchesApplies one or more patches to products. Available in Windows Installer 3.0.
MsiEnumPatchesExEnumerates all patches applied for a product in a particular context or across all contexts. Available in Windows Installer 3.0.
MsiGetPatchFileListWhen provided a list of .msp files this function retrieves the list of files that can be updated by the patches for the targe. Available in Windows Installer 4.0.
MsiGetPatchInfoExQueries for information about the application of a specified patch to a specified product. Available in Windows Installer 3.0.
MsiExtractPatchXMLDataExtracts information from a patch. Available in Windows Installer 3.0.
MsiDetermineApplicablePatchesDetermines the best set of patches required to update a product or set of products. Available in Windows Installer 3.0.

 

File Query Functions

NameDescription
MsiGetFileHashTakes the path to a file and returns a 128-bit hash of that file.
MsiGetFileSignatureInformationTakes the path to a file that has been digitally signed and returns the file's signer certificate and hash.
MsiGetFileVersionReturns the version string and language string.

 

Transaction Management Functions

NameDescription
MsiBeginTransactionStarts transaction processing of a multiple-package installation and returns an identifier for the transaction. This function is available beginning with Windows Installer 4.5.
MsiJoinTransactionRequests that the Windows Installer make the current process the owner of the transaction installing a multi-package installation. This function is available beginning with Windows Installer 4.5.
MsiEndTransactionCommits or rolls back all the installations belonging to the transaction. This function is available beginning with Windows Installer 4.5.

 

Database Functions

In addition to the Windows Installer functions identified in the previous tables, you can manipulate information in the installation database by using the database access functions that are described in the Database Functions section.

Installer Structures

In addition, some information in the installation database is handled using the structures described in the Installer Structures section.

Send comments about this topic to Microsoft

Build date: 6/25/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker