Feature Element

WiX

Feature Element

Description
A feature for the Feature table. Features are the smallest installable unit. See msi.chm for more detailed information on the myriad installation options for a feature.
Windows Installer references
Feature Table
Parents
Feature, FeatureGroup, FeatureRef, Fragment, Product
Inner Text
None
Children
Choice of elements (min: 0, max: unbounded)
  • Component (min: 0, max: unbounded)
  • ComponentGroupRef (min: 0, max: unbounded)
  • ComponentRef (min: 0, max: unbounded)
  • Condition (min: 0, max: unbounded)
  • Feature (min: 0, max: unbounded)
  • FeatureGroupRef (min: 0, max: unbounded)
  • FeatureRef (min: 0, max: unbounded)
  • MergeRef (min: 0, max: unbounded)
  • Any Element (namespace='##other' processContents='Lax') Extensibility point in the WiX XML Schema. Schema extensions can register additional elements at this point in the schema.
Attributes
Name Type Description Required
Id String Unique identifier of the feature. Yes
Absent Enumeration This attribute determines if a user will have the option to set a feature to absent in the user interface. This attribute's value must be one of the following:
allow
Allows the user interface to display an option to change the feature state to Absent.
disallow
Prevents the user interface from displaying an option to change the feature state to Absent by setting the msidbFeatureAttributesUIDisallowAbsent attribute. This will force the feature to the installation state, whether or not the feature is visible in the UI.
 
AllowAdvertise Enumeration This attribute determines the possible advertise states for this feature. This attribute's value must be one of the following:
no
Prevents this feature from being advertised by setting the msidbFeatureAttributesDisallowAdvertise attribute.
system
Prevents advertising for this feature if the operating system shell does not support Windows Installer descriptors by setting the msidbFeatureAttributesNoUnsupportedAdvertise attribute.
yes
Allows the feature to be advertised.
 
ConfigurableDirectory String Specify the Id of a Directory that can be configured by the user at installation time. This identifier must be a public property and therefore completely uppercase.  
Description String Longer string of text describing the feature. This localizable string is displayed by the Text Control of the Selection Dialog.  
Display String Determines the initial display of this feature in the feature tree. This attribute's value should be one of the following:
collapse
Initially shows the feature collapsed. This is the default value.
expand
Initially shows the feature expanded.
hidden
Prevents the feature from displaying in the user interface.
<an explicit integer value>
For advanced users only, it is possible to directly set the integer value of the display value that will appear in the Feature row.
 
InstallDefault Enumeration This attribute determines the default install/run location of a feature. This attribute cannot be specified if the value of the FollowParent attribute is 'yes' since that would ask the installer to force this feature to follow the parent installation state and simultaneously favor a particular installation state just for this feature. This attribute's value must be one of the following:
followParent
Forces the feature to follow the same installation state as its parent feature.
local
Favors installing this feature locally by setting the msidbFeatureAttributesFavorLocal attribute.
source
Favors running this feature from source by setting the msidbFeatureAttributesFavorSource attribute.
 
Level Integer Sets the install level of this feature. A value of 0 will disable the feature. Processing the Condition Table can modify the level value (this is set via the Condition child element). The default value is "1".  
Title String Short string of text identifying the feature. This string is listed as an item by the SelectionTree control of the Selection Dialog.  
TypicalDefault Enumeration This attribute determines the default advertise state of the feature. This attribute's value must be one of the following:
advertise
Sets the feature to be advertised by setting the msidbFeatureAttributesFavorAdvertise attribute. This value cannot be set if the value of the AllowAdvertise attribute is 'no' since that would ask the installer to disallow the advertised state for this feature while at the same time favoring it.
install
Sets the feature to the default non-advertised installation option.
 
Any Attribute (namespace='##other' processContents='lax') Extensibility point in the WiX XML Schema. Schema extensions can register additional attributes at this point in the schema.
How Tos and Examples
See Also
Wix Schema, FeatureRef