WiX Database XML Schema

Element: Directory

Description

Directory layout for the product.

Derived By

Restricting anyType

Attributes

Name  Type  Required?  Default  Description 
Id  string  Yes    This value is the unique identifier of the directory entry.
ComponentGuidGenerationSeed  Guid  No    The Component Guid Generation Seed is a guid that must be used when a Component with the generate guid directive ("*") is not rooted in a standard Windows Installer directory (for example, ProgramFilesFolder or CommonFilesFolder, etc).
DiskId  integer  No    Sets the default disk identifier for the files contained in this directory.
FileSource  string  No    Used to set the file system source for this directory's child elements.
LongName  LongFileNameType  No     
LongSource  LongFileNameType  No     
Name  LongFileNameType  No    The name of the directory.
ShortName  ShortFileNameType  No    The short name of the directory in 8.3 format.
ShortSourceName  ShortFileNameType  No    The short name of the directory on the source media in 8.3 format.
SourceName  LongFileNameType  No    The name of the directory on the source media.
src  string  No     

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
Directory  anyType (restriction)  1..1  Directory layout for the product.
Merge  anyType (restriction)  1..1  Merge directive to bring in a merge module that will be redirected to the parent directory.
SymbolPath  anyType (restriction)  1..1  A path to symbols.

Referenced By

Remarks

Also specifies the mappings between source and target directories.

Definition

<xs:element name="Directory">
<xs:annotation>
<xs:documentation>Directory layout for the product. Also specifies the mappings between source and target directories.</xs:documentation>
<xs:appinfo>
<xse:seeAlso ref="DirectoryRef" xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension" />
<xse:msiRef table="Directory" href="http://msdn.microsoft.com/library/aa368295.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="Directory" />
<xs:element ref="Merge" />
<xs:element ref="SymbolPath" />
<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>This value is the unique identifier of the directory entry.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ComponentGuidGenerationSeed" type="Guid">
<xs:annotation>
<xs:documentation>
The Component Guid Generation Seed is a guid that must be used when a Component with the generate guid directive ("*")
is not rooted in a standard Windows Installer directory (for example, ProgramFilesFolder or CommonFilesFolder, etc).
It is recommended that this attribute be avoided and that developers install their Components under standard
directories with unique names instead (for example, "ProgramFilesFolder\Company Name Product Name Version"). It is
important to note that once a directory is assigned a Component Guid Generation Seed the value must not change until
the directory name changes.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DiskId" type="xs:integer">
<xs:annotation>
<xs:documentation>
Sets the default disk identifier for the files contained in this directory.
This attribute must be set on a Component, Directory, or DirectoryRef element or all of its children File
elements, else the default disk identifier of 1 is assumed. The value of this attribute should correspond to the Id attribute of a
Media element authored elsewhere. By creating this connection between a component (or
particular files), you set the packaging options to the values specified in the Media
element (values such as compression level, cab embedding, etc...).
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="FileSource" type="xs:string">
<xs:annotation>
<xs:documentation>Used to set the file system source for this directory's child elements.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="LongName" type="LongFileNameType">
<xs:annotation>
<xs:appinfo>
<xse:deprecated ref="Name" xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension" />
</xs:appinfo>
</xs:annotation>
</xs:attribute>
<xs:attribute name="LongSource" type="LongFileNameType">
<xs:annotation>
<xs:appinfo>
<xse:deprecated ref="SourceName" xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension" />
</xs:appinfo>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Name" type="LongFileNameType">
<xs:annotation>
<xs:documentation>
The name of the directory.

Do not specify this attribute (or the LongName attribute) if this directory represents
the same directory as the parent (see the Windows Installer SDK's
<html:a href="http://msdn2.microsoft.com/library/Aa368295.aspx" target="_blank" xmlns:html="http://www.w3.org/1999/xhtml">Directory table</html:a>
topic for more information about the "." operator).

In prior versions of the WiX toolset, this attribute specified the short directory name.
This attribute's value may now be either a short or long directory name.
If a short directory name is specified, the ShortName attribute may not be specified.
If a long directory name is specified, the LongName attribute may not be specified.
Also, if this value is a long directory name, the ShortName attribute may be omitted to
allow WiX to attempt to generate a unique short directory name.
However, if this name collides with another directory or you wish to manually specify
the short directory name, then the ShortName attribute may be specified.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ShortName" type="ShortFileNameType">
<xs:annotation>
<xs:documentation>
The short name of the directory in 8.3 format.
This attribute should only be set if there is a conflict between generated short directory names
or the user wants to manually specify the short directory name.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ShortSourceName" type="ShortFileNameType">
<xs:annotation>
<xs:documentation>
The short name of the directory on the source media in 8.3 format.
This attribute should only be set if there is a conflict between generated short directory names
or the user wants to manually specify the short source directory name.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="SourceName" type="LongFileNameType">
<xs:annotation>
<xs:documentation>
The name of the directory on the source media.
If this attribute is note specified, the Windows Installer will default to the Name attribute.

In prior versions of the WiX toolset, this attribute specified the short source directory name.
This attribute's value may now be either a short or long directory name.
If a short directory name is specified, the ShortSourceName attribute may not be specified.
If a long directory name is specified, the LongSource attribute may not be specified.
Also, if this value is a long directory name, the ShortSourceName attribute may be omitted to
allow WiX to attempt to generate a unique short directory name.
However, if this name collides with another directory or you wish to manually specify
the short directory name, then the ShortSourceName attribute may be specified.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="src" type="xs:string">
<xs:annotation>
<xs:appinfo>
<xse:deprecated ref="FileSource" xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension" />
</xs:appinfo>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>