Directory Element

WiX

Directory Element

Description
Directory layout for the product. Also specifies the mappings between source and target directories.
Windows Installer references
Directory Table
Parents
Directory, DirectoryRef, Fragment, Module, Product
Inner Text
None
Children
Choice of elements (min: 0, max: unbounded)
  • Component (min: 0, max: unbounded)
  • Directory (min: 0, max: unbounded)
  • Merge (min: 0, max: unbounded)
  • SymbolPath (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 This value is the unique identifier of the directory entry. Yes
ComponentGuidGenerationSeed Guid 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). 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 (and must be changed when) the path to that directory, including itself and all parent directories, changes.  
DiskId DiskIdType Sets the default disk identifier for the files contained in this directory. This attribute's value may be overridden by a child Component, Directory, Merge or File element. See the File or Merge elements' DiskId attribute for more information.  
FileSource String Used to set the file system source for this directory's child elements. For more information, see Specifying source files.  
LongName LongFileNameType This attribute has been deprecated; please use the Name attribute instead.  
LongSource LongFileNameType This attribute has been deprecated; please use the SourceName attribute instead.  
Name LongFileNameType 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 Directory table 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.
 
ShortName ShortFileNameType 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.  
ShortSourceName ShortFileNameType 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.  
SourceName LongFileNameType The name of the directory on the source media. If this attribute is not specified, 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.
 
src String This attribute has been deprecated; please use the FileSource attribute instead.  
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, DirectoryRef