WiX Database XML Schema

Element: Feature

Description

A feature for the Feature table.

Derived By

Restricting anyType

Attributes

Name  Type  Required?  Default  Description 
Id  string  Yes    Unique identifier of the feature.
Absent  NMTOKEN (restriction)  No    This attribute determines if a user will have the option to set a feature to absent in the user interface.
AllowAdvertise  NMTOKEN (restriction)  No    This attribute determins the possible advertise states for this feature.
ConfigurableDirectory  string  No    Specify the Id of a Directory that can be configured by the user at installation time.
Description  string  No    Longer string of text describing the feature.
Display  string  No    Determines the initial display of this feature in the feature tree.

InstallDefault  NMTOKEN (restriction)  No    This attribute determines the default install/run location of a feature.
Level  integer  Yes    Sets the install level of this feature.
Title  string  No    Short string of text identifying the feature.
TypicalDefault  NMTOKEN (restriction)  No    This attribute determines the default advertise state of the feature.

Content Model

Contains elements as defined in the following table.

Component  Type  Occurs  Description 
    0..*   
any    1..1  Allow any element from the ##other namespace.
Component  anyType (restriction)  1..1  Component for parent Directory
ComponentGroupRef  anyType (restriction)  1..1  Create a reference to a ComponentGroup in another Fragment.
ComponentRef  anyType (restriction)  1..1  Create a reference to a Feature element in another Fragment.
Condition  string (extension)  1..1  Conditions for components, controls, features, and products.
Feature  anyType (restriction)  1..1  A feature for the Feature table.
FeatureGroupRef  anyType (restriction)  1..1  Create a reference to a FeatureGroup in another Fragment.
FeatureRef  anyType (restriction)  1..1  Create a reference to a Feature element in another Fragment.
MergeRef  anyType (restriction)  1..1  Merge reference to connect a Merge Module to parent Feature

Referenced By

Remarks

Features are the smallest installable unit. See msi.chm for more detailed information on the myriad installation options for a feature.

Definition

<xs:element name="Feature">
<xs:annotation>
<xs:documentation>
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.
</xs:documentation>
<xs:appinfo>
<xse:seeAlso ref="FeatureRef" xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension" />
<xse:msiRef table="Feature" href="http://msdn.microsoft.com/library/aa368585.aspx" xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension" />
<xse:howtoRef href="add_a_file.htm" xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension">How To: Add a file to your installer</xse:howtoRef>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="Component" />
<xs:element ref="ComponentGroupRef" />
<xs:element ref="ComponentRef" />
<xs:element ref="Condition" />
<xs:element ref="Feature" />
<xs:element ref="FeatureGroupRef" />
<xs:element ref="FeatureRef" />
<xs:element ref="MergeRef" />
<xs:any namespace="##other" processContents="lax">
<xs:annotation>
<xs:documentation>
Extensibility point in the WiX XML Schema. Schema extensions can register additional
elements at this point in the schema.
</xs:documentation>
</xs:annotation>
</xs:any>
</xs:choice>
<xs:attribute name="Id" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>Unique identifier of the feature.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Absent">
<xs:annotation>
<xs:documentation>
This attribute determines if a user will have the option to set a feature to absent in the user interface.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="allow">
<xs:annotation>
<xs:documentation>
Allows the user interface to display an option to change the feature state to Absent.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="disallow">
<xs:annotation>
<xs:documentation>
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.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="AllowAdvertise">
<xs:annotation>
<xs:documentation>
This attribute determins the possible advertise states for this feature.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="no">
<xs:annotation>
<xs:documentation>
Prevents this feature from being advertised by settting the msidbFeatureAttributesDisallowAdvertise attribute.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="system">
<xs:annotation>
<xs:documentation>
Prevents advertising for this feature if the operating system shell does not support Windows Installer
descriptors by setting the msidbFeatureAttributesNoUnsupportedAdvertise attribute.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="yes">
<xs:annotation>
<xs:documentation>
Allows the feature to be advertised.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="ConfigurableDirectory" type="xs:string">
<xs:annotation>
<xs:documentation>
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.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Description" type="xs:string">
<xs:annotation>
<xs:documentation>
Longer string of text describing the feature. This localizable string is displayed by the
Text Control of the Selection Dialog.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Display" type="xs:string">
<xs:annotation>
<xs:documentation>
Determines the initial display of this feature in the feature tree.
This attribute's value should be one of the following:
<html:dl xmlns:html="http://www.w3.org/1999/xhtml"><html:dt class="enumerationValue"><html:dfn>collapse</html:dfn></html:dt><html:dd>Initially shows the feature collapsed. This is the default value.</html:dd><html:dt class="enumerationValue"><html:dfn>expand</html:dfn></html:dt><html:dd>Initially shows the feature expanded.</html:dd><html:dt class="enumerationValue"><html:dfn>hidden</html:dfn></html:dt><html:dd>Prevents the feature from displaying in the user interface.</html:dd><html:dt class="enumerationValue"><html:dfn>&lt;an explicit integer value&gt;</html:dfn></html:dt><html:dd>
For advanced users only, it is possible to directly set the integer value
of the display value that will appear in the Feature row.
</html:dd></html:dl></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="InstallDefault">
<xs:annotation>
<xs:documentation>
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.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="followParent">
<xs:annotation>
<xs:documentation>
Forces the feature to follow the same installation state as its parent feature.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="local">
<xs:annotation>
<xs:documentation>
Favors installing this feature locally by setting the msidbFeatureAttributesFavorLocal attribute.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="source">
<xs:annotation>
<xs:documentation>
Favors running this feature from source by setting the msidbFeatureAttributesFavorSource attribute.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="Level" type="xs:integer" use="required">
<xs:annotation>
<xs:documentation>
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).
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Title" type="xs:string">
<xs:annotation>
<xs:documentation>
Short string of text identifying the feature. This string is listed as an item by the
SelectionTree control of the Selection Dialog.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="TypicalDefault">
<xs:annotation>
<xs:documentation>
This attribute determines the default advertise state of the feature.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="advertise">
<xs:annotation>
<xs:documentation>
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.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="install">
<xs:annotation>
<xs:documentation>
Sets the feature to the default non-advertised installation option.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:anyAttribute namespace="##other" processContents="lax">
<xs:annotation>
<xs:documentation>
Extensibility point in the WiX XML Schema. Schema extensions can register additional
attributes at this point in the schema.
</xs:documentation>
</xs:annotation>
</xs:anyAttribute>
</xs:complexType>
</xs:element>