MsiQueryFeatureState Function

Windows Installer

MsiQueryFeatureState Function

The MsiQueryFeatureState function returns the installed state for a product feature.

Syntax

C++INSTALLSTATE MsiQueryFeatureState(
  __in  LPCTSTR szProduct,
  __in  LPCTSTR szFeature
);

Parameters

szProduct [in]

Specifies the product code for the product that contains the feature of interest.

szFeature [in]

Identifies the feature of interest.

Return Value

Value Meaning
INSTALLSTATE_ABSENT

The feature is not installed.

INSTALLSTATE_ADVERTISED

The feature is advertised

INSTALLSTATE_LOCAL

The feature is installed locally.

INSTALLSTATE_SOURCE

The feature is installed to run from source.

INSTALLSTATE_INVALIDARG

An invalid parameter was passed to the function.

INSTALLSTATE_UNKNOWN

The product code or feature ID is unknown.

 

Remarks

The MsiQueryFeatureState function does not validate that the feature is actually accessible.

Requirements

VersionWindows Installer 5.0 on Windows Server 2008 R2 or Windows 7. Windows Installer 4.0 or Windows Installer 4.5 on Windows Server 2008 or Windows Vista. Windows Installer on Windows Server 2003, Windows XP, and Windows 2000. See the Windows Installer Run-Time Requirements for information about the minimum Windows service pack that is required by a Windows Installer version.
HeaderMsi.h
LibraryMsi.lib
DLLMsi.dll
Unicode and ANSI namesMsiQueryFeatureStateW (Unicode) and MsiQueryFeatureStateA (ANSI)

See Also

System Status Functions

Send comments about this topic to Microsoft

Build date: 8/13/2009

© 2009 Microsoft Corporation. All rights reserved.