File Element

WiX Help

File Element

Description

File specification for File table, must be child node of Component

Windows Installer references
File Table
Parents
Component, Include
Inner Text
None
Children
Choice of elements (min: 0, max: unbounded)
Attributes
Name Type Description Required
Id String   Yes
Assembly Enumeration Specifies if this File is a Win32 Assembly or .NET Assembly; the default is neither. If the value is '.net' or 'win32', this file must also be the key path of the Component. This attribute's value should be one of the following:
.net
no
win32
 
AssemblyApplication String Specifies the file identifier of the application file. This assembly will be isolated to the same directory as the application file. If this attribute is absent, the assembly will be installed to the Global Assembly Cache. This attribute may only be specified if the Assembly attribute is set to '.net' or 'win32'.  
AssemblyManifest String Specifies the file identifier of the manifest file that describes this assembly. The manifest file should be in the same component as the assembly it describes. This attribute may only be specified if the Assembly attribute is set to '.net' or 'win32'.  
BindPath String generates BindImage table row, value my be empty string  
Checksum YesNoType This attribute should be set to "yes" for every executable file in the installation that has a valid checksum stored in the Portable Executable (PE) file header. Only those files that have this attribute set will be verified for valid checksum during a reinstall.  
CompanionFile String Set this attribute to make this file a companion child of another file. The installation state of a companion file depends not on its own file versioning information, but on the versioning of its companion parent. A file that is the key path for its component can not be a companion file (that means this attribute cannot be set if KeyPath="yes" for this file). The Version attribute cannot be set along with this attribute since companion files are not installed based on their own version.  
Compressed YesNoDefaultType Sets the file's source type compression. A setting of "yes" or "no" will override the setting in the Word Count Summary Property.  
DefaultLanguage String This is the default language of this file. The linker will replace this value from the value in the file if the suppress files option is not used.  
DefaultSize Integer This is the default size of this file. The linker will replace this value from the value in the file if the suppress files option is not used.  
DefaultVersion String This is the default version of this file. The linker will replace this value from the value in the file if the suppress files option is not used.  
DiskId String Specifies the Media this File should be sourced on. This attribute must be set on this File element or its parent Component.  
FontTitle String generates entries in Font table with the FontTitle  
Hidden YesNoType Set to yes in order to have the file's hidden attribute set when it is installed on the target machine.  
KeyPath YesNoType Set yes to force this File to be key path for parent Component.  
LongName LongFileNameType Long file name; set this attribute if preferred name is not in 8.3 format.  
Name ShortFileNameType File name of the file in 8.3 format, required for backwards compatibility. Yes
PatchGroup Integer This attribute must be set for patch-added files. Each patch should be assigned a different patch group number. Patch groups numbers must be greater 0 and should be assigned consecutively. For example, the first patch should use PatchGroup='1', the second patch will have PatchGroup='2', etc...  
ProcessorArchitecture Enumeration Specifies the architecture for this assembly. This attribute should only be used on .NET Assemblies for the CLR 2.0. This attribute's value should be one of the following:
msil
x86
x64
ia64
 
ReadOnly YesNoType Set to yes in order to have the file's read-only attribute set when it is installed on the target machine.  
SelfRegCost Integer generates SelfReg table row  
Source String Specifies the path to the File in the build process. This attribute must be set if no source information can be gathered from parent directories.  
src String This attribute has been deprecated; please use the Source attribute instead.  
System YesNoType Set to yes in order to have the file's system attribute set when it is installed on the target machine.  
TrueType YesNoType generates entries in Font table with no FontTitle  
Vital YesNoType If a file is vital, then installation cannot proceed unless the file is successfully installed. The user will have no option to ignore an error installing this file. If an error occurs, they can merely retry to install the file or abort the installation.  
Any attribute namespace='##other' processContents='lax'
See Also
Wix Schema