Skip to main content

FeatureInfo Class

Provides access to information about a feature within the context of an installation session.

Methods

MethodDescription
GetCost(includeParents, includeChildren, installState)Calculates the disk space required by the feature and its selected children and parent features.

Properties

PropertyDescription
AttributesGets or sets the attributes of the feature.
CurrentStateGets the current install state of the feature.
DescriptionGets the description of the feature.
NameGets the name of the feature (primary key in the Feature table).
RequestStateGets or sets the action state of the feature.
TitleGets the title of the feature.
ValidStatesGets a list of valid installation states for the feature.

WixToolset.Dtf.WindowsInstaller.dll version 5.0.2+aa65968c419420d32e3e1b647aea0082f5ca5b78

GetCost(includeParents, includeChildren, installState) Method

Calculates the disk space required by the feature and its selected children and parent features.

Declaration

public System.Int64 GetCost(
bool includeParents,
bool includeChildren,
InstallState installState
)

Parameters

ParameterTypeDescription
includeParentsboolIf true, the parent features are included in the cost.
includeChildrenboolIf true, the child features are included in the cost.
installStateInstallStateSpecifies the installation state.

Return value

System.Int64 The disk space requirement in bytes.

Remarks

Win32 MSI API: MsiGetFeatureCost

Attributes Property

Gets or sets the attributes of the feature.

Declaration

public FeatureAttributes Attributes { get; set; } 

Remarks

Win32 MSI APIs: MsiGetFeatureInfo , MsiSetFeatureAttributes Since the lpAttributes paramter of MsiGetFeatureInfo does not contain an equivalent flag for «see F:WixToolset.Dtf.WindowsInstaller.FeatureAttributes.UIDisallowAbsent» , this flag will not be retrieved. Since the dwAttributes parameter of MsiSetFeatureAttributes does not contain an equivalent flag for «see F:WixToolset.Dtf.WindowsInstaller.FeatureAttributes.UIDisallowAbsent» , the presence of this flag will be ignored.

Exceptions

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InvalidHandleExceptionthe Session handle is invalid
T:System.ArgumentExceptionan unknown feature was requested

CurrentState Property

Gets the current install state of the feature.

Declaration

public InstallState CurrentState { get; set; } 

Remarks

Win32 MSI API: MsiGetFeatureState

Exceptions

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InvalidHandleExceptionthe Session handle is invalid
T:System.ArgumentExceptionan unknown feature was requested

Description Property

Gets the description of the feature.

Declaration

public string Description { get; set; } 

Remarks

Win32 MSI API: MsiGetFeatureInfo

Exceptions

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InvalidHandleExceptionthe Session handle is invalid
T:System.ArgumentExceptionan unknown feature was requested

Name Property

Gets the name of the feature (primary key in the Feature table).

Declaration

public string Name { get; set; } 

RequestState Property

Gets or sets the action state of the feature.

Declaration

public InstallState RequestState { get; set; } 

Remarks

When changing the feature action, the action state of all the Components linked to the changed Feature records are also updated appropriately, based on the new feature Select state. All Features can be configured at once by specifying the keyword ALL instead of a specific feature name. Win32 MSI APIs: MsiGetFeatureState , MsiSetFeatureState

Exceptions

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InvalidHandleExceptionthe Session handle is invalid
T:System.ArgumentExceptionan unknown feature was requested

Title Property

Gets the title of the feature.

Declaration

public string Title { get; set; } 

Remarks

Win32 MSI API: MsiGetFeatureInfo

Exceptions

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InvalidHandleExceptionthe Session handle is invalid
T:System.ArgumentExceptionan unknown feature was requested

ValidStates Property

Gets a list of valid installation states for the feature.

Declaration

public System.Collections.Generic.ICollection<WixToolset.Dtf.WindowsInstaller.InstallState> ValidStates { get; set; } 

Remarks

Win32 MSI API: MsiGetFeatureValidStates

Exceptions

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InvalidHandleExceptionthe Session handle is invalid
T:System.ArgumentExceptionan unknown feature was requested