MSI.GetFeatureCost

number MSI.GetFeatureCost ( 

number hInstall,

string Feature,

number CostTree,

number InstallState )

Description

Calls the MsiGetFeatureCost function that returns the disk space required by a feature and its selected children and parent features.

Parameters

hInstall

(number) The handle to the installation.

Note:  _hInstall is the default for this parameter. See Global Variables for more information.

Feature

(string) The name of the feature.

CostTree

(number) Specifies the value the function uses to determine disk space requirements. This parameter can be one of the following values.

CONSTANT

VALUE

DESCRIPTION

MSICOSTTREE_SELFONLY

0

The feature only is included in the cost.

MSICOSTTREE_CHILDREN

1

The children of the indicated feature are included in the cost.

MSICOSTTREE_PARENTS

2

The parent features of the indicated feature are included in the cost.

InstallState

(number) Specifies the installation state. This parameter can be one of the following values.

CONSTANT

VALUE

DESCRIPTION

INSTALLSTATE_UNKNOWN

-1

The product or feature is unrecognized.

INSTALLSTATE_ABSENT

2

The product or feature is uninstalled.

INSTALLSTATE_LOCAL

3

The product or feature is installed on the local drive.

INSTALLSTATE_SOURCE

4

The product or feature is installed to run from source, CD, or network.

INSTALLSTATE_DEFAULT

5

The product or feature will be installed to use the default location: local or source.

Returns

(number)  The disk space required by the selected feature in units of 512 bytes. You can use Application.GetLastError to determine whether this action failed, and why. You can also retrieve extended error information using the MSI.GetLastErrorRecord action.

See also:  Related Actions