MSI.QueryFeatureState

number MSI.QueryFeatureState ( 

string ProductCode,

string Feature )

Description

Calls the MsiQueryFeatureState function to get the installed state for a product feature.

Parameters

ProductCode

(string) The "product code" of the product containing the feature. This string must be an identifier string enclosed in curly braces, for example: "{78B82B0B-9AD9-40C0-B994-F72C21B52723}".

Feature

(string) The feature whose installed state you want.

Returns

(number) The installed state of the feature represented by one of the following values:

CONSTANT

VALUE

DESCRIPTION

INSTALLSTATE_INVALIDARG

-2

An invalid parameter was passed to the function.

INSTALLSTATE_UNKNOWN

-1

The product code or feature ID is unknown.

INSTALLSTATE_ADVERTISED

1

The feature is advertised.

INSTALLSTATE_ABSENT

2

The feature is not installed.

INSTALLSTATE_LOCAL

3

The feature is installed locally.

INSTALLSTATE_SOURCE

4

The feature is installed to run from source.

If the action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

See also:  Related Actions