Edit

Share via


msi.h header

This header is used by Application Installation and Servicing. For more information, see:

msi.h contains the following programming interfaces:

Functions

 
MsiAdvertiseProductA

The MsiAdvertiseProduct function generates an advertise script or advertises a product to the computer. (ANSI)
MsiAdvertiseProductExA

The MsiAdvertiseProductEx function generates an advertise script or advertises a product to the computer. (ANSI)
MsiAdvertiseProductExW

The MsiAdvertiseProductEx function generates an advertise script or advertises a product to the computer. (Unicode)
MsiAdvertiseProductW

The MsiAdvertiseProduct function generates an advertise script or advertises a product to the computer. (Unicode)
MsiAdvertiseScriptA

The MsiAdvertiseScript function copies an advertised script file into the specified locations. (ANSI)
MsiAdvertiseScriptW

The MsiAdvertiseScript function copies an advertised script file into the specified locations. (Unicode)
MsiApplyMultiplePatchesA

Applies one or more patches to products eligible to receive the patches. (ANSI)
MsiApplyMultiplePatchesW

Applies one or more patches to products eligible to receive the patches. (Unicode)
MsiApplyPatchA

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. (ANSI)
MsiApplyPatchW

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. (Unicode)
MsiBeginTransactionA

The MsiBeginTransaction function starts transaction processing of a multiple-package installation and returns an identifier for the transaction. (ANSI)
MsiBeginTransactionW

The MsiBeginTransaction function starts transaction processing of a multiple-package installation and returns an identifier for the transaction. (Unicode)
MsiCloseAllHandles

The MsiCloseAllHandles function closes all open installation handles allocated by the current thread. This is a diagnostic function and should not be used for cleanup.
MsiCloseHandle

The MsiCloseHandle function closes an open installation handle.
MsiCollectUserInfoA

The MsiCollectUserInfo function obtains and stores the user information and product ID from an installation wizard. (ANSI)
MsiCollectUserInfoW

The MsiCollectUserInfo function obtains and stores the user information and product ID from an installation wizard. (Unicode)
MsiConfigureFeatureA

The MsiConfigureFeature function configures the installed state for a product feature. (ANSI)
MsiConfigureFeatureW

The MsiConfigureFeature function configures the installed state for a product feature. (Unicode)
MsiConfigureProductA

The MsiConfigureProduct function installs or uninstalls a product. (ANSI)
MsiConfigureProductExA

Installs or uninstalls a product. (MsiConfigureProductExA)
MsiConfigureProductExW

Installs or uninstalls a product. (MsiConfigureProductExW)
MsiConfigureProductW

The MsiConfigureProduct function installs or uninstalls a product. (Unicode)
MsiDetermineApplicablePatchesA

The MsiDetermineApplicablePatches function takes a set of patch files, XML files, and XML blobs and determines which patches apply to a specified Windows Installer package and in what sequence. (ANSI)
MsiDetermineApplicablePatchesW

The MsiDetermineApplicablePatches function takes a set of patch files, XML files, and XML blobs and determines which patches apply to a specified Windows Installer package and in what sequence. (Unicode)
MsiDeterminePatchSequenceA

Takes a set of patch files, XML files, and XML blobs and determines the best sequence of application for the patches to a specified installed product. (ANSI)
MsiDeterminePatchSequenceW

Takes a set of patch files, XML files, and XML blobs and determines the best sequence of application for the patches to a specified installed product. (Unicode)
MsiEnableLogA

The MsiEnableLog function sets the log mode for all subsequent installations that are initiated in the calling process. (ANSI)
MsiEnableLogW

The MsiEnableLog function sets the log mode for all subsequent installations that are initiated in the calling process. (Unicode)
MsiEndTransaction

The MsiEndTransaction function can commit or roll back all the installations belonging to the transaction opened by the MsiBeginTransaction function.
MsiEnumClientsA

The MsiEnumClients function enumerates the clients for a given installed component. The function retrieves one product code each time it is called. (ANSI)
MsiEnumClientsExA

The MsiEnumClientsEx function enumerates the installed applications that use a specified component. The function retrieves a product code for an application each time it is called. (ANSI)
MsiEnumClientsExW

The MsiEnumClientsEx function enumerates the installed applications that use a specified component. The function retrieves a product code for an application each time it is called. (Unicode)
MsiEnumClientsW

The MsiEnumClients function enumerates the clients for a given installed component. The function retrieves one product code each time it is called. (Unicode)
MsiEnumComponentQualifiersA

The MsiEnumComponentQualifiers function enumerates the advertised qualifiers for the given component. This function retrieves one qualifier each time it is called. (ANSI)
MsiEnumComponentQualifiersW

The MsiEnumComponentQualifiers function enumerates the advertised qualifiers for the given component. This function retrieves one qualifier each time it is called. (Unicode)
MsiEnumComponentsA

The MsiEnumComponents function enumerates the installed components for all products. This function retrieves one component code each time it is called. (ANSI)
MsiEnumComponentsExA

The MsiEnumComponentsEx function enumerates installed components. The function retrieves the component code for one component each time it is called. The component code is the string GUID unique to the component, version, and language. (ANSI)
MsiEnumComponentsExW

The MsiEnumComponentsEx function enumerates installed components. The function retrieves the component code for one component each time it is called. The component code is the string GUID unique to the component, version, and language. (Unicode)
MsiEnumComponentsW

The MsiEnumComponents function enumerates the installed components for all products. This function retrieves one component code each time it is called. (Unicode)
MsiEnumFeaturesA

The MsiEnumFeatures function enumerates the published features for a given product. This function retrieves one feature ID each time it is called. (ANSI)
MsiEnumFeaturesW

The MsiEnumFeatures function enumerates the published features for a given product. This function retrieves one feature ID each time it is called. (Unicode)
MsiEnumPatchesA

The MsiEnumPatches function enumerates all of the patches that have been applied to a product. (ANSI)
MsiEnumPatchesExA

Enumerates all patches in a specific context or across all contexts. (ANSI)
MsiEnumPatchesExW

Enumerates all patches in a specific context or across all contexts. (Unicode)
MsiEnumPatchesW

The MsiEnumPatches function enumerates all of the patches that have been applied to a product. (Unicode)
MsiEnumProductsA

The MsiEnumProducts function enumerates through all the products currently advertised or installed. Products that are installed in both the per-user and per-machine installation context and advertisements are enumerated. (ANSI)
MsiEnumProductsExA

Enumerates through one or all the instances of products that are currently advertised or installed in the specified contexts. (ANSI)
MsiEnumProductsExW

Enumerates through one or all the instances of products that are currently advertised or installed in the specified contexts. (Unicode)
MsiEnumProductsW

The MsiEnumProducts function enumerates through all the products currently advertised or installed. Products that are installed in both the per-user and per-machine installation context and advertisements are enumerated. (Unicode)
MsiEnumRelatedProductsA

The MsiEnumRelatedProducts function enumerates products with a specified upgrade code. This function lists the currently installed and advertised products that have the specified UpgradeCode property in their Property table. (ANSI)
MsiEnumRelatedProductsW

The MsiEnumRelatedProducts function enumerates products with a specified upgrade code. This function lists the currently installed and advertised products that have the specified UpgradeCode property in their Property table. (Unicode)
MsiExtractPatchXMLDataA

The MsiExtractPatchXMLData function extracts information from a patch that can be used to determine if the patch applies to a target system. (ANSI)
MsiExtractPatchXMLDataW

The MsiExtractPatchXMLData function extracts information from a patch that can be used to determine if the patch applies to a target system. (Unicode)
MsiGetComponentPathA

The MsiGetComponentPath function returns the full path to an installed component. If the key path for the component is a registry key then the registry key is returned. (ANSI)
MsiGetComponentPathExA

Returns the full path to an installed component. (ANSI)
MsiGetComponentPathExW

Returns the full path to an installed component. (Unicode)
MsiGetComponentPathW

The MsiGetComponentPath function returns the full path to an installed component. If the key path for the component is a registry key then the registry key is returned. (Unicode)
MsiGetFeatureInfoA

Returns descriptive information for a feature. (ANSI)
MsiGetFeatureInfoW

Returns descriptive information for a feature. (Unicode)
MsiGetFeatureUsageA

The MsiGetFeatureUsage function returns the usage metrics for a product feature. (ANSI)
MsiGetFeatureUsageW

The MsiGetFeatureUsage function returns the usage metrics for a product feature. (Unicode)
MsiGetFileHashA

The MsiGetFileHash function takes the path to a file and returns a 128-bit hash of that file. Authoring tools may use MsiGetFileHash to obtain the file hash needed to populate the MsiFileHash table. (ANSI)
MsiGetFileHashW

The MsiGetFileHash function takes the path to a file and returns a 128-bit hash of that file. Authoring tools may use MsiGetFileHash to obtain the file hash needed to populate the MsiFileHash table. (Unicode)
MsiGetFileSignatureInformationA

The MsiGetFileSignatureInformation function takes the path to a file that has been digitally signed and returns the file's signer certificate and hash. (ANSI)
MsiGetFileSignatureInformationW

The MsiGetFileSignatureInformation function takes the path to a file that has been digitally signed and returns the file's signer certificate and hash. (Unicode)
MsiGetFileVersionA

The MsiGetFileVersion returns the version string and language string in the format that the installer expects to find them in the database. (ANSI)
MsiGetFileVersionW

The MsiGetFileVersion returns the version string and language string in the format that the installer expects to find them in the database. (Unicode)
MsiGetPatchFileListA

The MsiGetPatchFileList function is provided a list of .msp files, delimited by semicolons, and retrieves the list of files that can be updated by the patches. (ANSI)
MsiGetPatchFileListW

The MsiGetPatchFileList function is provided a list of .msp files, delimited by semicolons, and retrieves the list of files that can be updated by the patches. (Unicode)
MsiGetPatchInfoA

The MsiGetPatchInfo function returns information about a patch. (ANSI)
MsiGetPatchInfoExA

Queries for information about the application of a patch to a specified instance of a product. (ANSI)
MsiGetPatchInfoExW

Queries for information about the application of a patch to a specified instance of a product. (Unicode)
MsiGetPatchInfoW

The MsiGetPatchInfo function returns information about a patch. (Unicode)
MsiGetProductCodeA

The MsiGetProductCode function returns the product code of an application by using the component code of an installed or advertised component of the application. (ANSI)
MsiGetProductCodeW

The MsiGetProductCode function returns the product code of an application by using the component code of an installed or advertised component of the application. (Unicode)
MsiGetProductInfoA

The MsiGetProductInfo function returns product information for published and installed products. (ANSI)
MsiGetProductInfoExA

Returns product information for advertised and installed products. (ANSI)
MsiGetProductInfoExW

Returns product information for advertised and installed products. (Unicode)
MsiGetProductInfoFromScriptA

The MsiGetProductInfoFromScript function returns product information for a Windows Installer script file. (ANSI)
MsiGetProductInfoFromScriptW

The MsiGetProductInfoFromScript function returns product information for a Windows Installer script file. (Unicode)
MsiGetProductInfoW

The MsiGetProductInfo function returns product information for published and installed products. (Unicode)
MsiGetProductPropertyA

The MsiGetProductProperty function retrieves product properties. These properties are in the product database. (ANSI)
MsiGetProductPropertyW

The MsiGetProductProperty function retrieves product properties. These properties are in the product database. (Unicode)
MsiGetShortcutTargetA

The MsiGetShortcutTarget function examines a shortcut and returns its product, feature name, and component if available. (ANSI)
MsiGetShortcutTargetW

The MsiGetShortcutTarget function examines a shortcut and returns its product, feature name, and component if available. (Unicode)
MsiGetUserInfoA

The MsiGetUserInfo function returns the registered user information for an installed product. (ANSI)
MsiGetUserInfoW

The MsiGetUserInfo function returns the registered user information for an installed product. (Unicode)
MsiInstallMissingComponentA

The MsiInstallMissingComponent function installs files that are unexpectedly missing. (ANSI)
MsiInstallMissingComponentW

The MsiInstallMissingComponent function installs files that are unexpectedly missing. (Unicode)
MsiInstallMissingFileA

The MsiInstallMissingFile function installs files that are unexpectedly missing. (ANSI)
MsiInstallMissingFileW

The MsiInstallMissingFile function installs files that are unexpectedly missing. (Unicode)
MsiInstallProductA

Installs or uninstalls a product. (MsiInstallProductA)
MsiInstallProductW

Installs or uninstalls a product. (MsiInstallProductW)
MsiIsProductElevatedA

The MsiIsProductElevated function returns whether or not the product is managed. (ANSI)
MsiIsProductElevatedW

The MsiIsProductElevated function returns whether or not the product is managed. (Unicode)
MsiJoinTransaction

The MsiJoinTransaction function requests that the Windows Installer make the current process the owner of the transaction installing the multiple-package installation.
MsiLocateComponentA

The MsiLocateComponent function returns the full path to an installed component without a product code. (ANSI)
MsiLocateComponentW

The MsiLocateComponent function returns the full path to an installed component without a product code. (Unicode)
MsiNotifySidChangeA

The MsiNotifySidChange function notifies and updates the Windows Installer internal information with changes to user SIDs. (ANSI)
MsiNotifySidChangeW

The MsiNotifySidChange function notifies and updates the Windows Installer internal information with changes to user SIDs. (Unicode)
MsiOpenPackageA

The MsiOpenPackage function opens a package to use with the functions that access the product database. (ANSI)
MsiOpenPackageExA

The MsiOpenPackageEx function opens a package to use with functions that access the product database. (ANSI)
MsiOpenPackageExW

The MsiOpenPackageEx function opens a package to use with functions that access the product database. (Unicode)
MsiOpenPackageW

The MsiOpenPackage function opens a package to use with the functions that access the product database. (Unicode)
MsiOpenProductA

The MsiOpenProduct function opens a product for use with the functions that access the product database. The MsiCloseHandle function must be called with the handle when the handle is no longer needed. (ANSI)
MsiOpenProductW

The MsiOpenProduct function opens a product for use with the functions that access the product database. The MsiCloseHandle function must be called with the handle when the handle is no longer needed. (Unicode)
MsiProcessAdvertiseScriptA

The MsiProcessAdvertiseScript function processes an advertise script file into the specified locations. (ANSI)
MsiProcessAdvertiseScriptW

The MsiProcessAdvertiseScript function processes an advertise script file into the specified locations. (Unicode)
MsiProvideAssemblyA

The MsiProvideAssembly function returns the full path to a Windows Installer component that contains an assembly. The function prompts for a source and performs any necessary installation. MsiProvideAssembly increments the usage count for the feature. (ANSI)
MsiProvideAssemblyW

The MsiProvideAssembly function returns the full path to a Windows Installer component that contains an assembly. The function prompts for a source and performs any necessary installation. MsiProvideAssembly increments the usage count for the feature. (Unicode)
MsiProvideComponentA

The MsiProvideComponent function returns the full component path, performing any necessary installation. This function prompts for source if necessary and increments the usage count for the feature. (ANSI)
MsiProvideComponentW

The MsiProvideComponent function returns the full component path, performing any necessary installation. This function prompts for source if necessary and increments the usage count for the feature. (Unicode)
MsiProvideQualifiedComponentA

The MsiProvideQualifiedComponent function returns the full component path for a qualified component and performs any necessary installation. This function prompts for source if necessary, and increments the usage count for the feature. (ANSI)
MsiProvideQualifiedComponentExA

The MsiProvideQualifiedComponentEx function returns the full component path for a qualified component that is published by a product and performs any necessary installation. (ANSI)
MsiProvideQualifiedComponentExW

The MsiProvideQualifiedComponentEx function returns the full component path for a qualified component that is published by a product and performs any necessary installation. (Unicode)
MsiProvideQualifiedComponentW

The MsiProvideQualifiedComponent function returns the full component path for a qualified component and performs any necessary installation. This function prompts for source if necessary, and increments the usage count for the feature. (Unicode)
MsiQueryComponentStateA

The MsiQueryComponentState function returns the installed state for a component. (ANSI)
MsiQueryComponentStateW

The MsiQueryComponentState function returns the installed state for a component. (Unicode)
MsiQueryFeatureStateA

The MsiQueryFeatureState function returns the installed state for a product feature. (ANSI)
MsiQueryFeatureStateExA

The MsiQueryFeatureStateEx function returns the installed state for a product feature. (ANSI)
MsiQueryFeatureStateExW

The MsiQueryFeatureStateEx function returns the installed state for a product feature. (Unicode)
MsiQueryFeatureStateW

The MsiQueryFeatureState function returns the installed state for a product feature. (Unicode)
MsiQueryProductStateA

The MsiQueryProductState function returns the installed state for a product. (ANSI)
MsiQueryProductStateW

The MsiQueryProductState function returns the installed state for a product. (Unicode)
MsiReinstallFeatureA

Reinstalls features. (ANSI)
MsiReinstallFeatureW

Reinstalls features. (Unicode)
MsiReinstallProductA

Reinstalls products. (ANSI)
MsiReinstallProductW

Reinstalls products. (Unicode)
MsiRemovePatchesA

Removes one or more patches from a single product. (ANSI)
MsiRemovePatchesW

Removes one or more patches from a single product. (Unicode)
MsiSetExternalUIA

The MsiSetExternalUI function enables an external user-interface handler. (ANSI)
MsiSetExternalUIRecord

The MsiSetExternalUIRecord function enables an external user-interface (UI) handler.
MsiSetExternalUIW

The MsiSetExternalUI function enables an external user-interface handler. (Unicode)
MsiSetInternalUI

The MsiSetInternalUI function enables the installer's internal user interface. Then this user interface is used for all subsequent calls to user-interface-generating installer functions in this process. For more information, see User Interface Levels.
MsiSourceListAddMediaDiskA

The MsiSourceListAddMediaDisk function adds or updates a disk of the media source of a registered product or patch. (ANSI)
MsiSourceListAddMediaDiskW

The MsiSourceListAddMediaDisk function adds or updates a disk of the media source of a registered product or patch. (Unicode)
MsiSourceListAddSourceA

Adds to the list of valid network sources that contain the specified type of sources for a product or patch in a specified user context. (ANSI)
MsiSourceListAddSourceExA

Adds or reorders the set of sources of a patch or product in a specified context. It can also create a source list for a patch that does not exist in the specified context. (ANSI)
MsiSourceListAddSourceExW

Adds or reorders the set of sources of a patch or product in a specified context. It can also create a source list for a patch that does not exist in the specified context. (Unicode)
MsiSourceListAddSourceW

Adds to the list of valid network sources that contain the specified type of sources for a product or patch in a specified user context. (Unicode)
MsiSourceListClearAllA

The MsiSourceListClearAll function removes all network sources from the source list of a patch or product in a specified context. For more information, see Source Resiliency. (ANSI)
MsiSourceListClearAllExA

The MsiSourceListClearAllEx function removes all the existing sources of a given source type for the specified product or patch instance. (ANSI)
MsiSourceListClearAllExW

The MsiSourceListClearAllEx function removes all the existing sources of a given source type for the specified product or patch instance. (Unicode)
MsiSourceListClearAllW

The MsiSourceListClearAll function removes all network sources from the source list of a patch or product in a specified context. For more information, see Source Resiliency. (Unicode)
MsiSourceListClearMediaDiskA

The MsiSourceListClearMediaDisk function provides the ability to remove an existing registered disk under the media source for a product or patch in a specific context. (ANSI)
MsiSourceListClearMediaDiskW

The MsiSourceListClearMediaDisk function provides the ability to remove an existing registered disk under the media source for a product or patch in a specific context. (Unicode)
MsiSourceListClearSourceA

Removes an existing source for a product or patch in a specified context. (ANSI)
MsiSourceListClearSourceW

Removes an existing source for a product or patch in a specified context. (Unicode)
MsiSourceListEnumMediaDisksA

The MsiSourceListEnumMediaDisks function enumerates the list of disks registered for the media source for a patch or product. (ANSI)
MsiSourceListEnumMediaDisksW

The MsiSourceListEnumMediaDisks function enumerates the list of disks registered for the media source for a patch or product. (Unicode)
MsiSourceListEnumSourcesA

The MsiSourceListEnumSources function enumerates the sources in the source list of a specified patch or product. (ANSI)
MsiSourceListEnumSourcesW

The MsiSourceListEnumSources function enumerates the sources in the source list of a specified patch or product. (Unicode)
MsiSourceListForceResolutionA

The MsiSourceListForceResolution function forces the installer to search the source list for a valid product source the next time a source is required. (ANSI)
MsiSourceListForceResolutionExA

The MsiSourceListForceResolutionEx function removes the registration of the property called "LastUsedSource". (ANSI)
MsiSourceListForceResolutionExW

The MsiSourceListForceResolutionEx function removes the registration of the property called "LastUsedSource". (Unicode)
MsiSourceListForceResolutionW

The MsiSourceListForceResolution function forces the installer to search the source list for a valid product source the next time a source is required. (Unicode)
MsiSourceListGetInfoA

The MsiSourceListGetInfo function retrieves information about the source list for a product or patch in a specific context. (ANSI)
MsiSourceListGetInfoW

The MsiSourceListGetInfo function retrieves information about the source list for a product or patch in a specific context. (Unicode)
MsiSourceListSetInfoA

Sets information about the source list for a product or patch in a specific context. (ANSI)
MsiSourceListSetInfoW

Sets information about the source list for a product or patch in a specific context. (Unicode)
MsiUseFeatureA

The MsiUseFeature function increments the usage count for a particular feature and indicates the installation state for that feature. This function should be used to indicate an application's intent to use a feature. (ANSI)
MsiUseFeatureExA

The MsiUseFeatureEx function increments the usage count for a particular feature and indicates the installation state for that feature. This function should be used to indicate an application's intent to use a feature. (ANSI)
MsiUseFeatureExW

The MsiUseFeatureEx function increments the usage count for a particular feature and indicates the installation state for that feature. This function should be used to indicate an application's intent to use a feature. (Unicode)
MsiUseFeatureW

The MsiUseFeature function increments the usage count for a particular feature and indicates the installation state for that feature. This function should be used to indicate an application's intent to use a feature. (Unicode)
MsiVerifyPackageA

The MsiVerifyPackage function verifies that the given file is an installation package. (ANSI)
MsiVerifyPackageW

The MsiVerifyPackage function verifies that the given file is an installation package. (Unicode)

Callback functions

 
INSTALLUI_HANDLER_RECORD

The INSTALLUI_HANDLER_RECORD function prototype defines a callback function that the installer calls for progress notification and error messages. Call the MsiSetExternalUIRecord function to enable a record-base external user-interface (UI) handler.
INSTALLUI_HANDLERA

The INSTALLUI_HANDLER function prototype defines a callback function that the installer calls for progress notification and error messages. (ANSI)
INSTALLUI_HANDLERW

The INSTALLUI_HANDLER function prototype defines a callback function that the installer calls for progress notification and error messages. (Unicode)

Structures

 
MSIFILEHASHINFO

The MSIFILEHASHINFO structure contains the file hash information returned by MsiGetFileHash and used in the MsiFileHash table.
MSIPATCHSEQUENCEINFOA

The MSIPATCHSEQUENCEINFO structure is used by the MsiDeterminePatchSequence and MsiDetermineApplicablePatches functions. (ANSI)
MSIPATCHSEQUENCEINFOW

The MSIPATCHSEQUENCEINFO structure is used by the MsiDeterminePatchSequence and MsiDetermineApplicablePatches functions. (Unicode)