Database Access Reference

[This is preliminary documentation and subject to change.]

The material in this section is intended for developers who are writing their own setup programs and developers who want to learn more about the Microsoft® Windows® installer database tables. For general information on the installer, see About Windows Installer.

You can use the installer access functions to access the database and the installation process. These functions should only be used by custom installation actions and authoring tools. Some of the installer access functions require SQL query strings for querying the database. Queries must adhere to the installer SQL syntax.

This topic lists the installer database access functions by category.

General Database Access Functions

You can use the following general access functions in your application:

MsiDatabaseCommit

MsiDatabaseGetPrimaryKeys

MsiDatabaseIsTablePersistent

MsiDatabaseOpenView

MsiGetActiveDatabase

MsiOpenDatabase

MsiViewClose

MsiViewExecute

MsiViewFetch

MsiViewGetError

MsiViewModify

Database Management Functions

You can use the following access functions to manage the database:

MsiCreateTransformSummaryInfo

MsiDatabaseApplyTransform

MsiDatabaseExport

MsiDatabaseGenerateTransform

MsiDatabaseImport

MsiDatabaseMerge

MsiGetDatabaseState

Record Processing Functions

You can use the following functions to process database records:

MsiCreateRecord

MsiRecordClearData

MsiRecordDataSize

MsiRecordGetFieldCount

MsiRecordGetInteger

MsiRecordGetString

MsiRecordIsNull

MsiRecordReadStream

MsiRecordSetInteger

MsiRecordSetStream

MsiRecordSetString

Summary Information Property Functions

You can use the following functions with the summary information properties:

MsiGetSummaryInformation

MsiSummaryInfoGetProperty

MsiSummaryInfoGetPropertyCount

MsiSummaryInfoPersist

MsiSummaryInfoSetProperty

Installer State Access Functions

You can use the following functions to change or monitor the installer state:

MsiGetLanguage

MsiGetLastErrorRecord

MsiGetMode

MsiGetProperty

MsiSetProperty

MsiSetMode

Installer Action Functions

You can use the following functions to access the installer actions:

MsiDoAction

MsiEvaluateCondition

MsiProcessMessage

MsiSequence

Installer Location Functions

You can use the following functions to access the installer folder location:

MsiGetSourcePath

MsiGetTargetPath

MsiSetTargetPath

Installer Selection Functions

You can use the following functions to access the installer selection state:

MsiGetComponentState

MsiGetFeatureCost

MsiGetFeatureState

MsiGetFeatureValidStates

MsiSetComponentState

MsiSetFeatureState

MsiSetInstallLevel

MsiVerifyDiskSpace

User Interface Functions

You can use the following functions to preview user interface dialog boxes:

MsiEnableUIPreview

MsiPreviewBillboard

MsiPreviewDialog

All functions support both ANSI and Unicode calls. To use these functions, include MsiQuery.h and link with Msi.lib.

Installation Functions

In addition to the database access functions listed above, you create an installation package for an application by using the installer functions listed in the Installer Function Reference section.