Summary
Groups sets of files into named sets, these can be used to install and perform operations on a set of files as one entity.
Parameters
Attribute | Type | Description | Required | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name | string | A name used to refer to the component. | True | ||||||||||
id | string | A string GUID unique to this component, version, and language. Note that the letters of these GUIDs must be uppercase. Utilities such as GUIDGEN can generate GUIDs containing lowercase letters. The lowercase letters must be changed to uppercase to make these valid component code GUIDs. |
True | ||||||||||
attr | int | This column contains a bit flag that specifies options for remote execution. Add the indicated bit to the total value in the column to include an option.
Set this bit for all components belonging to a feature to prevent the feature from being run-from-network or run-from-source. Note that if a feature has no components, the feature always shows run-from-source and run-from-my-computer as valid options. Set this bit for all components belonging to a feature to prevent the feature from being run-from-my-computer. Note that if a feature has no components, the feature always shows run-from-source and run-from-my-computer as valid options. If the Value field of the corresponding record in the Registry table is null, the Name field in that record must not contain "+", "-", or "*". For more information, see the description of the Name field in Registry table. Setting this bit is recommended for registry entries written to the HKCU hive. This ensures the installer writes the necessary HKCU registry entries when there are multiple users on the same machine. This bit should only be set for transitive components. See Using Transitive Components. Use this flag only for components that are being registered by the Registry table.
|
True | ||||||||||
directory | string | Refrence to a directory. Defines the directory location for where the files assigned to the component are to be placed. | True | ||||||||||
feature | string | Refrence to a feature. Maps a feature to the component. Used to determine if the component is to be installed or not. | True | ||||||||||
condition | string | A conditional statement that can control whether a component is installed. If the condition is null or evaluates to true, then the component is enabled. If the condition evaluates to False, then the component is disabled and is not installed. | False | ||||||||||
fileattr | int | Integer containing bit flags representing file attributes. The following table shows the definition of the bit field.
|
False | ||||||||||
checkinterop | bool | Used to determine if file(s) in the fileset are interop file(s). If true , extra information will be added in the install
package to register each interop file. If false , the file(s) will not be not be checked and the extra registration information
will not be added to the msi. |
False | ||||||||||
installassembliestogac | bool | Used to determine if assemblies should be installed to the Global Assembly Cache.
If true , all assemblies in the fileset will be added to the GAC. If false , the assemblies will be installed
to the specified directory (as a normal file would). Note: If an assembly is specified to be installed into the GAC, it will not
also be installed to the directory specified. |
False | ||||||||||
keepsubdirs | bool | Used to determine if directories in the fileset should be built.
If true , all subdirectories of the fileset basedir will be built. If false the directories structure will be
flattened. The default is false . |
False |
Nested Elements:
<keyfile>
-
This value points to a file or folder belonging to the component that the installer uses to detect the component. Two components cannot share the same key path value.
-
file string Name of the key (file) to use. Also, this could be an id of a registry key value. True
Parameters
</keyfile>
<fileset>
-
Specifies the files to include with the component
</fileset>
<forceid>
-
Used to force specific attributes on a per file basis
-
file string Name of the file, in the fileset, to override. True -
id string Unique GUID to assign to the file. True -
attr int Integer containing bit flags representing file attributes.
The following table shows the definition of the bit field.-
1 Read-Only -
2 Hidden -
4 System -
512 The file is vital for the proper operation of the component to which it belongs -
1024 The file contains a valid checksum. A checksum is required to repair a file that has become corrupted. -
4096 This bit must only be added by a patch and if the file is being added by the patch. -
8192 The file's source type is uncompressed. If set, ignore the Word Count Summary Property. If neither msidbFileAttributesNoncompressed or msidbFileAttributesCompressed are set, the compression state of the file is specified by the Word Count Summary Property. Do not set both msidbFileAttributesNoncompressed and msidbFileAttributesCompressed. -
16384 The file's source type is compressed. If set, ignore the Word Count Summary Property. If neither msidbFileAttributesNoncompressed or msidbFileAttributesCompressed are set, the compression state of the file is specified by the Word Count Summary Property. Do not set both msidbFileAttributesNoncompressed and msidbFileAttributesCompressed.
Value Description False -
-
version string This field is the version string for a versioned file. This field is blank for non-versioned files. False -
language string A list of decimal language IDs separated by commas. False -
checkinterop bool Used to determine if file is an interop file. If true , extra information will be added in the install package to register the interop file. Iffalse , the file will not be not be checked and the extra registration information will not be added to the msi.False -
installtogac bool If true , and if the file is an assembly, it will be installed to the GAC. Iffalse , the file will be installed to the directory specified by the component. Note: If an assembly is specified to be installed into the GAC, it will not also be installed to the directory specified.False
Parameters
</forceid>
Examples
<components>
<component name="C__MainFiles" id="{26AA7144-E683-441D-9843-3C79AEC1C636}" attr="2" directory="TARGETDIR" feature="F__MainFiles" >
<key file="default.aspx" />
<fileset basedir="${install.dir}">
<include name="*.*" />
</fileset>
</component>
</components>
<components>
<component name="C__MainFiles" id="{26AA7144-E683-441D-9843-3C79AEC1C636}" attr="2" directory="TARGETDIR" feature="F__MainFiles" installassembliestogac="true" >
<key file="MyAssemblyName.xml" />
<fileset basedir="${install.dir}">
<include name="*.*" />
</fileset>
<forceid file="MyOtherAssembly.dll" id="_4EB7CCB23D394958988ED817DA00B9D1" installtogac="false" />
</component>
</components>
<components>
<component name="C__RegistryEntry" id="{06C654AA-273D-4E39-885C-3E5225D9F336}" attr="4" directory="TARGETDIR" feature="F__DefaultFeature" >
<key file="R__822EC365A8754FACBF6C713BFE4E57F0" />
</component>
</components>
.
.
.
<registry>
<key path="SOFTWARE\MyCompany\MyProduct\" root="machine" component="C__RegistryEntry">
<value id="R__822EC365A8754FACBF6C713BFE4E57F0" name="MyKeyName" value="MyKeyValue" />
</key>
</registry>
- Assembly
- NAnt
.Contrib .dll - Namespace
- NAnt
.Contrib .Tasks .Msi - Containing Type
- InstallerTaskBase
Syntax
[BuildElement("components", ProcessXml = false)]
public SchemaElement[] InstallerComponentsElement { get; set; }
Attributes
Type | Description |
---|---|
BuildElement |
Value
Type | Description |
---|---|
SchemaElement[] |