WiX Database XML Schema

Element: Condition

Description

Conditions for components, controls, features, and products.

Derived By

Extending string

Attributes

Name  Type  Required?  Default  Description 
Action  NMTOKEN (restriction)  No    Used only under Control elements and is required. Allows specific actions to be applied to a control based on the result of this condition.
Level  integer  No    Used only under Feature elements and is required.
Message  string  No    Used only under Fragment or Product elements and is required.

Content Model

Contains text only.

Referenced By

Remarks

The condition is specified in the inner text of the element.

Definition

<xs:element name="Condition">
<xs:annotation>
<xs:documentation>
Conditions for components, controls, features, and products. The condition is specified in the inner text of the element.
</xs:documentation>
<xs:appinfo>
<xse:msiRef table="Component" href="http://msdn.microsoft.com/library/aa368007.aspx" xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension" />
<xse:msiRef table="ControlCondition" href="http://msdn.microsoft.com/library/aa368035.aspx" xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension" />
<xse:msiRef table="Condition" href="http://msdn.microsoft.com/library/aa368014.aspx" xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension" />
<xse:msiRef table="LaunchCondition" href="http://msdn.microsoft.com/library/aa369752.aspx" xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension" />
<xse:howtoRef href="block_install_on_os.htm" xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension">How To: Block installation based on OS version</xse:howtoRef>
<xse:howtoRef href="check_the_version_number.htm" xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension">How To: Check the version number of a file during installation</xse:howtoRef>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:annotation>
<xs:documentation>
Under a Component element, the condition becomes the condition of the component. Under a Control element,
the condition becomes a ControlCondition entry. Under a Feature element, the condition becomes a Condition
entry. Under a Fragment or Product element, the condition becomes a LaunchCondition entry.
</xs:documentation>
</xs:annotation>
<xs:attribute name="Action">
<xs:annotation>
<xs:documentation>
Used only under Control elements and is required. Allows specific actions to be applied to a control based
on the result of this condition.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="default">
<xs:annotation>
<xs:documentation>
Set the Control as the default. Only used under Control elements.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="enable">
<xs:annotation>
<xs:documentation>
Enable the Control. Only used under Control elements.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="disable">
<xs:annotation>
<xs:documentation>
Disable the Control. Only used under Control elements.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="hide">
<xs:annotation>
<xs:documentation>
Hide the Control. Only used under Control elements.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="show">
<xs:annotation>
<xs:documentation>
Display the Control. Only used under Control elements.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="Level" type="xs:integer">
<xs:annotation>
<xs:documentation>
Used only under Feature elements and is required. Allows modifying the level of a Feature based on the
result of this condition.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Message" type="xs:string">
<xs:annotation>
<xs:documentation>
Used only under Fragment or Product elements and is required. Set the value to the text to display when the
condition fails and the installation must be terminated.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>