Friday, June 13, 2008

Windows Installer API Functions

Note: I've searched the various links to get information at one place. I've not checked the help for validation. So I'm not responsible for any issue found related to the contents specified in the blog. Please use contents at own risk.

Most Windows Installer API functions take a handle to the currently running database as an argument. For an InstallScript custom action, the database handle is the HWND argument passed to the custom action. In an event-handler function, you can use the global variable ISMSI_HANDLE, which stores the handle to the running .msi database.


MsiApplyPatch MsiGetLanguage MsiRecordSetInteger
MsiCloseHandle MsiGetLastErrorRecord MsiRecordSetStream
MsiCreateTransformSummaryInfo MsiGetMode MsiRecordSetString
MsiDatabaseApplyTransform MsiGetProperty MsiSequence
MsiDatabaseExport MsiGetSourcePath MsiSetComponentState
MsiDatabaseGenerateTransform MsiGetSummaryInformation MsiSetFeatureAttributes
MsiDatabaseGetPrimaryKeys MsiGetTargetPath MsiSetFeatureState
MsiDatabaseImport MsiInstallProduct MsiSetInstallLevel
MsiDatabaseIsTablePersistent MsiOpenDatabase MsiSetMode
MsiDatabaseMerge MsiOpenPackage MsiSetProperty
MsiDatabaseOpenView MsiPreviewBillboard MsiSetTargetPath
MsiDoAction MsiPreviewDialog MsiSummaryInfoGetProperty
MsiEnumComponentCosts MsiProcessMessage MsiSummaryInfoSetProperty
MsiEvaluateCondition MsiRecordClearData MsiVerifyDiskSpace
MsiFormatRecord MsiRecordDataSize MsiViewClose
MsiGetActiveDatabase MsiRecordGetFieldCount MsiViewExecute
MsiGetComponentState MsiRecordGetInteger MsiViewFetch
MsiGetFeatureCost MsiRecordGetString MsiViewGetColumnInfo
MsiGetFeatureState MsiRecordIsNull MsiViewGetError
MsiGetFeatureValidStates MsiRecordReadStream








Declaration about the functions is :

Declare Function MsiApplyPatch lib "MSI" (ByVal szPatchPackage As String, ByVal szInstallPackage As String, ByVal eInstallType As Struct_MembersOf_INSTALLTYPE, ByVal szCommandLine As String) As Long
Declare Function MsiCloseAllHandles lib "MSI" () As Long
Declare Function MsiCloseHandle lib "MSI" (ByRef hAny As MSIHANDLE) As Long
Declare Function MsiCollectUserInfo lib "MSI" (ByVal szProduct As String) As Long
Declare Function MsiConfigureFeature lib "MSI" (ByVal szProduct As String, ByVal szFeature As String, ByVal eInstallState As Struct_MembersOf_INSTALLSTATE) As Long
Declare Function MsiConfigureProduct lib "MSI" (ByVal szProduct As String, ByVal iInstallLevel As Long, ByVal eInstallState As Struct_MembersOf_INSTALLSTATE) As Long
Declare Function MsiConfigureProductEx lib "MSI" (ByVal szProduct As String, ByVal iInstallLevel As Long, ByVal eInstallState As Struct_MembersOf_INSTALLSTATE, ByVal szCommandLine As String) As Long
Declare Sub MsiCreateRecord lib "MSI" (ByVal cParams As Long)
Declare Function MsiCreateTransformSummaryInfo lib "MSI" (ByRef hDatabase As MSIHANDLE, ByRef hDatabaseReference As MSIHANDLE, ByVal szTransformFile As String, ByVal iErrorConditions As Long, ByVal iValidation As Long) As Long
Declare Function MsiDatabaseApplyTransform lib "MSI" (ByRef hDatabase As MSIHANDLE, ByVal szTransformFile As String, ByVal iErrorConditions As Long) As Long
Declare Function MsiDatabaseCommit lib "MSI" (ByRef hDatabase As MSIHANDLE) As Long
Declare Function MsiDatabaseExport lib "MSI" (ByRef hDatabase As MSIHANDLE, ByVal szTableName As String, ByVal szFolderPath As String, ByVal szFileName As String) As Long
Declare Function MsiDatabaseGenerateTransform lib "MSI" (ByRef hDatabase As MSIHANDLE, ByRef hDatabaseReference As MSIHANDLE, ByVal szTransformFile As String, ByVal iReserved1 As Long, ByVal iReserved2 As Long) As Long
Declare Function MsiDatabaseGetPrimaryKeys lib "MSI" (ByRef hDatabase As MSIHANDLE, ByVal szTableName As String, ByRef phRecord As MSIHANDLE) As Long
Declare Function MsiDatabaseImport lib "MSI" (ByRef hDatabase As MSIHANDLE, ByVal szFolderPath As String, ByVal szFileName As String) As Long
Declare Function MsiDatabaseIsTablePersistent lib "MSI" (ByRef hDatabase As MSIHANDLE, ByVal szTableName As String) As MSICONDITION
Declare Function MsiDatabaseMerge lib "MSI" (ByRef hDatabase As MSIHANDLE, ByRef hDatabaseMerge As MSIHANDLE, ByVal szTableName As String) As Long
Declare Function MsiDatabaseOpenView lib "MSI" (ByRef hDatabase As MSIHANDLE, ByVal szQuery As String, ByRef phView As MSIHANDLE) As Long
Declare Function MsiDoAction lib "MSI" (ByRef hInstall As MSIHANDLE, ByVal szAction As String) As Long
Declare Function MsiEnableLog lib "MSI" (ByVal dwLogMode As Long, ByVal szLogFile As String, ByVal dwLogAttributes As Long) As Long
Declare Function MsiEnableUIPreview lib "MSI" (ByRef hDatabase As MSIHANDLE, ByRef phPreview As MSIHANDLE) As Long
Declare Function MsiEnumClients lib "MSI" (ByVal szComponent As String, ByVal iProductIndex As Long, ByVal lpProductBuf As String) As Long
Declare Function MsiEnumComponentQualifiers lib "MSI" (ByVal szComponent As String, ByVal iIndex As Long, ByVal lpQualifierBuf As String, ByRef pcchQualifierBuf As Long, ByVal lpApplicationDataBuf As String, ByRef pcchApplicationDataBuf As Long) As Long
Declare Function MsiEnumComponents lib "MSI" (ByVal iComponentIndex As Long, ByVal lpComponentBuf As String) As Long
Declare Function MsiEnumFeatures lib "MSI" (ByVal szProduct As String, ByVal iFeatureIndex As Long, ByVal lpFeatureBuf As String, ByVal lpParentBuf As String) As Long
Declare Function MsiEnumPatches lib "MSI" (ByVal szProduct As String, ByVal iPatchIndex As Long, ByVal lpPatchBuf As String, ByVal lpTransformsBuf As String, ByRef pcchTransformsBuf As Long) As Long
Declare Function MsiEnumProducts lib "MSI" (ByVal iProductIndex As Long, ByVal lpProductBuf As String) As Long
Declare Function MsiEnumRelatedProducts lib "MSI" (ByVal lpUpgradeCode As String, ByVal dwReserved As Long, ByVal iProductIndex As Long, ByVal lpProductBuf As String) As Long
Declare Function MsiEvaluateCondition lib "MSI" (ByRef hInstall As MSIHANDLE, ByVal szCondition As String) As MSICONDITION
Declare Function MsiFormatRecord lib "MSI" (ByRef hInstall As MSIHANDLE, ByRef hRecord As MSIHANDLE, ByVal szResultBuf As String, ByRef pcchResultBuf As Long) As Long
Declare Sub MsiGetActiveDatabase lib "MSI" (ByRef hInstall As MSIHANDLE)
Declare Function MsiGetComponentPath lib "MSI" (ByVal szProduct As String, ByVal szComponent As String, ByVal lpPathBuf As String, ByRef pcchBuf As Long) As INSTALLSTATE
Declare Function MsiGetComponentState lib "MSI" (ByRef hInstall As MSIHANDLE, ByVal szComponent As String, ByRef piInstalled As INSTALLSTATE, ByRef piAction As INSTALLSTATE) As Long
Declare Function MsiGetDatabaseState lib "MSI" (ByRef hDatabase As MSIHANDLE) As MSIDBSTATE
Declare Function MsiGetFeatureCost lib "MSI" (ByRef hInstall As MSIHANDLE, ByVal szFeature As String, ByVal iCostTree As Struct_MembersOf_MSICOSTTREE, ByRef iState As INSTALLSTATE, ByRef piCost As Long) As Long
Declare Function MsiGetFeatureInfo lib "MSI" (ByRef hProduct As MSIHANDLE, ByVal szFeature As String, ByRef lpAttributes As Long, ByVal lpTitleBuf As String, ByRef pcchTitleBuf As Long, ByVal lpHelpBuf As String, ByRef pcchHelpBuf As Long) As Long
Declare Function MsiGetFeatureState lib "MSI" (ByRef hInstall As MSIHANDLE, ByVal szFeature As String, ByRef piInstalled As INSTALLSTATE, ByRef piAction As INSTALLSTATE) As Long
Declare Function MsiGetFeatureUsage lib "MSI" (ByVal szProduct As String, ByVal szFeature As String, ByRef pdwUseCount As Long, ByRef pwDateUsed As Integer) As Long
Declare Function MsiGetFeatureValidStates lib "MSI" (ByRef hInstall As MSIHANDLE, ByVal szFeature As String, ByRef dwInstallStates As Long) As Long
Declare Function MsiGetFileVersion lib "MSI" (ByVal szFilePath As String, ByVal lpVersionBuf As String, ByRef pcchVersionBuf As Long, ByVal lpLangBuf As String, ByRef pcchLangBuf As Long) As Long
Declare Function MsiGetLanguage lib "MSI" (ByRef hInstall As MSIHANDLE) As Long
Declare Function MsiGetMode lib "MSI" (ByRef hInstall As MSIHANDLE, ByVal eRunMode As Struct_MembersOf_MSIRUNMODE) As Long
Declare Function MsiGetPatchInfo lib "MSI" (ByVal szPatch As String, ByVal szAttribute As String, ByVal lpValueBuf As String, ByRef pcchValueBuf As Long) As Long
Declare Function MsiGetProductCode lib "MSI" (ByVal szComponent As String, ByVal lpBuf39 As String) As Long
Declare Function MsiGetProductInfo lib "MSI" (ByVal szProduct As String, ByVal szAttribute As String, ByVal lpValueBuf As String, ByRef pcchValueBuf As Long) As Long
Declare Function MsiGetProductProperty lib "MSI" (ByRef hProduct As MSIHANDLE, ByVal szProperty As String, ByVal lpValueBuf As String, ByRef pcchValueBuf As Long) As Long
Declare Function MsiGetProperty lib "MSI" (ByRef hInstall As MSIHANDLE, ByVal szName As String, ByVal szValueBuf As String, ByRef pcchValueBuf As Long) As Long
Declare Function MsiGetShortcutTarget lib "MSI" (ByVal szShortcutPath As String, ByVal szProductCode As String, ByVal szFeatureId As String, ByVal szComponentCode As String) As Long
Declare Function MsiGetSourcePath lib "MSI" (ByRef hInstall As MSIHANDLE, ByVal szFolder As String, ByVal szPathBuf As String, ByRef pcchPathBuf As Long) As Long
Declare Function MsiGetSummaryInformation lib "MSI" (ByRef hDatabase As MSIHANDLE, ByVal szDatabasePath As String, ByVal uiUpdateCount As Long, ByRef phSummaryInfo As MSIHANDLE) As Long
Declare Function MsiGetTargetPath lib "MSI" (ByRef hInstall As MSIHANDLE, ByVal szFolder As String, ByVal szPathBuf As String, ByRef pcchPathBuf As Long) As Long
Declare Function MsiGetUserInfo lib "MSI" (ByVal szProduct As String, ByVal lpUserNameBuf As String, ByRef pcchUserNameBuf As Long, ByVal lpOrgNameBuf As String, ByRef pcchOrgNameBuf As Long, ByVal lpSerialBuf As String, ByRef pcchSerialBuf As Long) As USERINFOSTATE
Declare Function MsiInstallMissingComponent lib "MSI" (ByVal szProduct As String, ByVal szComponent As String, ByVal eInstallState As Struct_MembersOf_INSTALLSTATE) As Long
Declare Function MsiInstallMissingFile lib "MSI" (ByVal szProduct As String, ByVal szFile As String) As Long
Declare Function MsiInstallProduct lib "MSI" (ByVal szPackagePath As String, ByVal szCommandLine As String) As Long
Declare Function MsiLocateComponent lib "MSI" (ByVal szComponent As String, ByVal lpPathBuf As String, ByRef pcchBuf As Long) As INSTALLSTATE
Declare Function MsiOpenDatabase lib "MSI" (ByVal szDatabasePath As String, ByVal szPersist As String, ByRef phDatabase As MSIHANDLE) As Long
Declare Function MsiOpenPackage lib "MSI" (ByVal szPackagePath As String, ByRef hProduct As MSIHANDLE) As Long
Declare Function MsiOpenProduct lib "MSI" (ByVal szProduct As String, ByRef hProduct As MSIHANDLE) As Long
Declare Function MsiPreviewBillboard lib "MSI" (ByRef hPreview As MSIHANDLE, ByVal szControlName As String, ByVal szBillboard As String) As Long
Declare Function MsiPreviewDialog lib "MSI" (ByRef hPreview As MSIHANDLE, ByVal szDialogName As String) As Long
Declare Function MsiProcessMessage lib "MSI" (ByRef hInstall As MSIHANDLE, ByRef eMessageType As INSTALLMESSAGE, ByRef hRecord As MSIHANDLE) As Long
Declare Function MsiProvideComponent lib "MSI" (ByVal szProduct As String, ByVal szFeature As String, ByVal szComponent As String, ByVal dwInstallMode As Long, ByVal lpPathBuf As String, ByRef pcchPathBuf As Long) As Long
Declare Function MsiProvideQualifiedComponent lib "MSI" (ByVal szCategory As String, ByVal szQualifier As String, ByVal dwInstallMode As Long, ByVal lpPathBuf As String, ByRef pcchPathBuf As Long) As Long
Declare Function MsiProvideQualifiedComponentEx lib "MSI" (ByVal szCategory As String, ByVal szQualifier As String, ByVal dwInstallMode As Long, ByVal szProduct As String, ByVal dwUnused1 As Long, ByVal dwUnused2 As Long, ByVal lpPathBuf As String, ByRef pcchPathBuf As Long) As Long
Declare Function MsiQueryFeatureState lib "MSI" (ByVal szProduct As String, ByVal szFeature As String) As INSTALLSTATE
Declare Function MsiQueryProductState lib "MSI" (ByVal szProduct As String) As INSTALLSTATE
Declare Function MsiRecordClearData lib "MSI" (ByRef hRecord As MSIHANDLE) As Long
Declare Function MsiRecordDataSize lib "MSI" (ByRef hRecord As MSIHANDLE, ByVal iField As Long) As Long
Declare Function MsiRecordGetFieldCount lib "MSI" (ByRef hRecord As MSIHANDLE) As Long
Declare Function MsiRecordGetInteger lib "MSI" (ByRef hRecord As MSIHANDLE, ByVal iField As Long) As Long
Declare Function MsiRecordGetString lib "MSI" (ByRef hRecord As MSIHANDLE, ByVal iField As Long, ByVal szValueBuf As String, ByRef pcchValueBuf As Long) As Long
Declare Function MsiRecordIsNull lib "MSI" (ByRef hRecord As MSIHANDLE, ByVal iField As Long) As Long
Declare Function MsiRecordReadStream lib "MSI" (ByRef hRecord As MSIHANDLE, ByVal iField As Long, ByVal szDataBuf As String, ByRef pcbDataBuf As Long) As Long
Declare Function MsiRecordSetInteger lib "MSI" (ByRef hRecord As MSIHANDLE, ByVal iField As Long, ByVal iValue As Long) As Long
Declare Function MsiRecordSetStream lib "MSI" (ByRef hRecord As MSIHANDLE, ByVal iField As Long, ByVal szFilePath As String) As Long
Declare Function MsiRecordSetString lib "MSI" (ByRef hRecord As MSIHANDLE, ByVal iField As Long, ByVal szValue As String) As Long
Declare Function MsiReinstallFeature lib "MSI" (ByVal szProduct As String, ByVal szFeature As String, ByVal dwReinstallMode As Long) As Long
Declare Function MsiReinstallProduct lib "MSI" (ByVal szProduct As String, ByVal szReinstallMode As Long) As Long
Declare Function MsiSequence lib "MSI" (ByRef hInstall As MSIHANDLE, ByVal szTable As String, ByVal iSequenceMode As Long) As Long
Declare Function MsiSetComponentState lib "MSI" (ByRef hInstall As MSIHANDLE, ByVal szComponent As String, ByRef iState As INSTALLSTATE) As Long
Declare Sub MsiSetExternalUI lib "MSI" (ByRef puiHandler As INSTALLUI_HANDLERA, ByVal dwMessageFilter As Long, pvContext As Any)
Declare Function MsiSetFeatureAttributes lib "MSI" (ByRef hInstall As MSIHANDLE, ByVal szFeature As String, ByVal dwAttributes As Long) As Long
Declare Function MsiSetFeatureState lib "MSI" (ByRef hInstall As MSIHANDLE, ByVal szFeature As String, ByRef iState As INSTALLSTATE) As Long
Declare Function MsiSetInstallLevel lib "MSI" (ByRef hInstall As MSIHANDLE, ByVal iInstallLevel As Long) As Long
Declare Function MsiSetInternalUI lib "MSI" (ByVal dwUILevel As Struct_MembersOf_INSTALLUILEVEL, ByRef phWnd As Long) As INSTALLUILEVEL
Declare Function MsiSetMode lib "MSI" (ByRef hInstall As MSIHANDLE, ByVal eRunMode As Struct_MembersOf_MSIRUNMODE, ByVal fState As Long) As Long
Declare Function MsiSetTargetPath lib "MSI" (ByRef hInstall As MSIHANDLE, ByVal szFolder As String, ByVal szFolderPath As String) As Long
Declare Function MsiSourceListAddSource lib "MSI" (ByVal szProduct As String, ByVal szUserName As String, ByVal dwReserved As Long, ByVal szSource As String) As Long
Declare Function MsiSourceListClearAll lib "MSI" (ByVal szProduct As String, ByVal szUserName As String, ByVal dwReserved As Long) As Long
Declare Function MsiSourceListForceResolution lib "MSI" (ByVal szProduct As String, ByVal szUserName As String, ByVal dwReserved As Long) As Long
Declare Function MsiSummaryInfoGetProperty lib "MSI" (ByRef hSummaryInfo As MSIHANDLE, ByVal uiProperty As Long, ByRef puiDataType As Long, ByRef piValue As Long, ByRef pftValue As FILETIME, ByVal szValueBuf As String, ByRef pcchValueBuf As Long) As Long
Declare Function MsiSummaryInfoGetPropertyCount lib "MSI" (ByRef hSummaryInfo As MSIHANDLE, ByRef puiPropertyCount As Long) As Long
Declare Function MsiSummaryInfoPersist lib "MSI" (ByRef hSummaryInfo As MSIHANDLE) As Long
Declare Function MsiSummaryInfoSetProperty lib "MSI" (ByRef hSummaryInfo As MSIHANDLE, ByVal uiProperty As Long, ByVal uiDataType As Long, ByVal iValue As Long, ByRef pftValue As FILETIME, ByVal szValue As String) As Long
Declare Function MsiUseFeature lib "MSI" (ByVal szProduct As String, ByVal szFeature As String) As INSTALLSTATE
Declare Function MsiUseFeatureEx lib "MSI" (ByVal szProduct As String, ByVal szFeature As String, ByVal dwInstallMode As Long, ByVal dwReserved As Long) As INSTALLSTATE
Declare Function MsiVerifyDiskSpace lib "MSI" (ByRef hInstall As MSIHANDLE) As Long
Declare Function MsiVerifyPackage lib "MSI" (ByVal szPackagePath As String) As Long
Declare Function MsiViewClose lib "MSI" (ByRef hView As MSIHANDLE) As Long
Declare Function MsiViewExecute lib "MSI" (ByRef hView As MSIHANDLE, ByRef hRecord As MSIHANDLE) As Long
Declare Function MsiViewFetch lib "MSI" (ByRef hView As MSIHANDLE, ByRef phRecord As MSIHANDLE) As Long
Declare Function MsiViewGetColumnInfo lib "MSI" (ByRef hView As MSIHANDLE, ByVal eColumnInfo As Struct_MembersOf_MSICOLINFO, ByRef phRecord As MSIHANDLE) As Long
Declare Function MsiViewGetError lib "MSI" (ByRef hView As MSIHANDLE, ByVal szColumnNameBuffer As String, ByRef pcchBuf As Long) As MSIDBERROR
Declare Function MsiViewModify lib "MSI" (ByRef hView As MSIHANDLE, ByVal eModifyMode As Struct_MembersOf_MSIMODIFY, ByRef hRecord As MSIHANDLE) As Long



Windows Installer API Functions by Category

To quickly navigate to a function category, click on one of the options below.

  • MSI Property and Mode Functions [MsiSetProperty,MsiGetProductInfo,MsiGetProperty,MsiGetLanguage,MsiGetMode]
  • Feature and Component Functions [MsiGetFeatureState,MsiSetFeatureState,MsiSetFeatureAttributes,MsiGetFeatureValidStates,
          • MsiGetComponentState,MsiSetComponentState,MsiGetFeatureCost,MsiSetInstallLevel]
  • Directory Functions [MsiGetSourcePath,MsiGetTargetPath,MsiSetTargetPath,MsiVerifyDiskSpace]
  • Database Functions [MsiEvaluateCondition,MsiGetActiveDatabase,MsiDatabaseApplyTransform,MsiDatabaseExport,
          • MsiDatabaseGenerateTransform,MsiDatabaseGetPrimaryKeys,MsiDatabaseImport,
          • MsiDatabaseIsTablePersistent,MsiDatabaseMerge,MsiDatabaseOpenView,MsiFormatRecord,
          • MsiViewModify,MsiOpenDatabase,MsiViewClose,MsiViewExecute,MsiViewFetch,MsiRecordGetString,
          • MsiRecordSetString,MsiRecordReadStream,MsiRecordSetStream,MsiRecordGetInteger,MsiRecordSetInteger,MsiViewGetColumnInfo,
          • MsiRecordGetFieldCount,MsiCloseHandle,MsiCloseAllHandles,MsiViewGetError]
  • Summary Information Stream Management Functions [MsiGetSummaryInformation,MsiSummaryInfoGetProperty,MsiSummaryInfoSetProperty]
  • Miscellaneous Functions [MsiApplyPatch,MsiCreateRecord,MsiDoAction,MsiEvaluateCondition,MsiInstallProduct,MsiOpenPackage,MsiPreviewBillboard,
          • MsiPreviewDialog,MsiProcessMessage,MsiSequence]





MSI Property and Mode Functions




MsiSetProperty Sets the value of a Windows Installer property. Creates the property if it does not exist. (For an example, see Get or Set a Property.)
MsiGetProductInfo Returns product information for published and installed products.
MsiGetProperty Gets the value of a Windows Installer property. Returns a null string ("") if the property does not exist.
MsiGetLanguage Returns the numeric language ID for the running installation.
MsiGetMode Returns an internal boolean Installer state.
MsiSetMode Sets an internal boolean Installer state.

Feature and Component Functions

MsiGetFeatureState Gets the installation state and action state of a feature.
MsiSetFeatureState Sets the installation state of a feature.
MsiSetFeatureAttributes:Sets the attributes for a feature.
MsiGetFeatureValidStates:Returns a set of bit flags representing the valid installation states of a feature.
MsiGetComponentState Gets the installation state and action state of a component.
MsiSetComponentState Sets the installation state of a component.
MsiGetFeatureCost Returns the disk cost of a feature (in units of 512 bytes), and optionally its parent and child features.
MsiSetInstallLevel Sets the install level for the entire product.

Directory Functions

MsiGetSourcePath Returns the full source path for a directory listed in the Directory table. (The Directory table is exposed in the Direct Editor.)
MsiGetTargetPath Returns the full target path for a directory listed in the Directory table.
MsiSetTargetPath Sets the full target path for a directory listed in the Directory table.
MsiVerifyDiskSpace Verifies if sufficient disk space exists for the current installation.

Database Functions

With the exception of MsiGetActiveDatabase, the first HWND argument in most of these functions is a handle to a specific database view or record.

MsiEvaluateCondition Evaluates a conditional expression that contains property names and values.
MsiGetActiveDatabase Obtains a handle to the running .msi database, which you can use to open database views.
MsiDatabaseApplyTransform: Applies a transform to a database. A transform is a way of recording changes to a database without altering the original database.
MsiDatabaseExport Exports an installer table from an open database to a text archive file.

MsiDatabaseGenerateTransform Generates a transform file of differences between two databases. A transform is a way of recording changes to a database without altering the original database.

MsiDatabaseGetPrimaryKeys Returns a record containing the names of all the primary key columns for a specified table. This function returns a handle that should be closed using MsiCloseHandle.

MsiDatabaseImport Imports an installer text archive table into an open database.
MsiDatabaseIsTablePersistent Returns an enumeration describing the state of a particular table.
MsiDatabaseMerge Merges two databases together, allowing duplicate rows.
MsiDatabaseOpenView Prepares a database query, creating a view object.
MsiFormatRecord Formats record field data and properties using a format string.
MsiViewModify Modifies a database record. For a running installation, only temporary database changes are allowed.
MsiOpenDatabase Opens a database file for data access. This function returns a handle that should be closed using MsiCloseHandle.
MsiViewClose Closes an executed database view.
MsiViewExecute Executes a SQL query.
MsiViewFetch Fetches a record for the current database view.
MsiRecordGetString Returns the string stored in a specific field of the specified record.
MsiRecordSetString Sets the string stored in a specific field of the specified record.
MsiRecordReadStream Returns the string value of a record field.
MsiRecordSetStream Sets a record stream field from a file. Stream data cannot be inserted into temporary fields.
MsiRecordGetInteger Returns the integer stored in a specific field of the specified record.
MsiRecordSetInteger Sets the integer stored in a specific field of the specified record.
MsiViewGetColumnInfo Returns a record containing database column names or definitions.
MsiRecordGetFieldCount:Returns the number of fields (columns) in a record.
MsiCloseHandle Closes a database, view, or record handle.
MsiCloseAllHandles Closes all open handles. Provided for diagnostic purposes, and should not be called for general cleanup.
MsiViewGetError Returns an error code for an error generated by MsiViewModify.

Summary Information Stream Management Functions

MsiGetSummaryInformation obtains a handle to summary information data for an installer database. This function returns a handle that should be closed using MsiCloseHandle.

MsiSummaryInfoGetProperty Gets a single property from the summary information.
MsiSummaryInfoSetProperty Sets a single summary information property.

Miscellaneous Functions

MsiApplyPatch 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.

MsiCreateRecord Creates a new record object with the specified number of fields. This function returns a handle that should be closed using MsiCloseHandle.
MsiDoAction Executes a built-in action, custom action, or user-interface wizard action.
MsiEvaluateCondition Evaluates a conditional expression containing property names and values.
MsiInstallProduct Installs or uninstalls a product.
MsiOpenPackage Opens a package 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.

MsiPreviewBillboard Displays a billboard within a host control in the displayed dialog. Supplying a null billboard name removes any billboard displayed.
MsiPreviewDialog Displays a dialog box as modeless and inactive.
MsiProcessMessage Sends an error record to the installer for processing.
MsiSequence Executes another action sequence, as described in the specified table.














Related Raadings:
1. Windows Installer Development Tools
2. A couple of notes about the contents of the Windows Installer 4.5 SDK
3. Windows Installer Tools & Tips
4. Wrapping the Windows Installer 2.0 API
5. Installer Functions

















No comments: