Description
Component for parent Directory
Derived By
Restricting anyType
Attributes
| Name |
Type |
Required? |
Default |
Description |
| Id |
string |
Yes |
|
Component identifier; this is the primary key for identifying components.
|
| ComPlusFlags |
integer |
No |
|
Set this attribute to create a ComPlus entry.
|
| DisableRegistryReflection |
YesNoType |
No |
|
Set this attribute to 'yes' in order to disable registry reflection on all existing and new registry keys affected by this component.
|
| Directory |
string |
No |
|
Sets the Directory of the Component.
|
| DiskId |
integer |
No |
|
This attribute must be set either on a Component element or all of its children File elements.
|
| Feature |
string |
No |
|
Identifies a feature to which this component belongs, as a shorthand for a child ComponentRef element of the Feature element.
|
| Guid |
ComponentGuid |
Yes |
|
This value should be a guid that uniquely identifies this component's contents, language, platform, and version.
|
| KeyPath |
YesNoType |
No |
|
If this attribute's value is set to 'yes', then the Directory of this Component is used as the KeyPath.
|
| Location |
NMTOKEN (restriction) |
No |
|
|
| NeverOverwrite |
YesNoType |
No |
|
If this attribute is set to 'yes', the installer does not install or reinstall the component if a key path file or a key path registry entry for the component already exists.
|
| Permanent |
YesNoType |
No |
|
If this attribute is set to 'yes', the installer does not remove the component during an uninstall.
|
| Shared |
YesNoType |
No |
|
If this attribute's value is set to 'yes', enables advanced patching semantics for Components that are shared across multiple Products.
|
| SharedDllRefCount |
YesNoType |
No |
|
If this attribute's value is set to 'yes', the installer increments the reference count in the shared DLL registry of the component's key file.
|
| Transitive |
YesNoType |
No |
|
If this attribute is set to 'yes', the installer reevaluates the value of the statement in the Condition upon a reinstall.
|
| UninstallWhenSuperseded |
YesNoType |
No |
|
If this attribute is set to 'yes', the installer will uninstall the Component's files and registry keys when it is superseded by a patch.
|
| Win64 |
YesNoType |
No |
|
Set this attribute to 'yes' to mark this as a 64-bit component.
|
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.
|
| AppId |
anyType (restriction) |
1..1 |
Application ID containing DCOM information for the associated application GUID.
|
| Category |
anyType (restriction) |
1..1 |
Qualified published component for parent Component
|
| Class |
anyType (restriction) |
1..1 |
COM Class registration for parent Component.
|
| Condition |
string (extension) |
1..1 |
Conditions for components, controls, features, and products.
|
| CopyFile |
anyType (restriction) |
1..1 |
Copy or move an existing file on the target machine, or copy a file that is being installed, to another destination.
|
| CreateFolder |
anyType (restriction) |
1..1 |
Create folder as part of parent Component.
|
| Environment |
anyType (restriction) |
1..1 |
Environment variables added or removed for the parent component.
|
| Extension |
anyType (restriction) |
1..1 |
Extension for a Component
|
| File |
anyType (restriction) |
1..1 |
File specification for File table, must be child node of Component.
|
| IniFile |
anyType (restriction) |
1..1 |
Adds or removes .ini file entries.
|
| Interface |
anyType (restriction) |
1..1 |
COM Interface registration for parent Typelib.
|
| IsolateComponent |
anyType (restriction) |
1..1 |
Shared Component to be privately replicated in folder of parent Component
|
| ODBCDataSource |
anyType (restriction) |
1..1 |
ODBCDataSource for a Component
|
| ODBCDriver |
anyType (restriction) |
1..1 |
ODBCDriver for a Component
|
| ODBCTranslator |
anyType (restriction) |
1..1 |
ODBCTranslator for a Component
|
| ProgId |
anyType (restriction) |
1..1 |
ProgId registration for parent Component.
|
| Registry |
anyType (restriction) |
1..1 |
|
| RegistryKey |
anyType (restriction) |
1..1 |
Used for organization of child RegistryValue elements or to create a registry key (and optionally remove it during uninstallation).
|
| RegistryValue |
anyType (restriction) |
1..1 |
Used to create a registry value. For multi-string values, this can be used to prepend or append values.
|
| RemoveFile |
anyType (restriction) |
1..1 |
Remove a file(s) if the parent component is selected for installation or removal.
|
| RemoveFolder |
anyType (restriction) |
1..1 |
Remove an empty folder if the parent component is selected for installation or removal.
|
| RemoveRegistryKey |
anyType (restriction) |
1..1 |
Used for removing registry keys and all child keys either during install or uninstall.
|
| RemoveRegistryValue |
anyType (restriction) |
1..1 |
Used to remove a registry value during installation.
|
| ReserveCost |
anyType (restriction) |
1..1 |
Disk cost to reserve in a folder for running locally and/or from source.
|
| ServiceControl |
anyType (restriction) |
1..1 |
Starts, stops, and removes services for parent Component.
|
| ServiceInstall |
anyType (restriction) |
1..1 |
Adds and removes services for parent Component.
|
| Shortcut |
anyType (restriction) |
1..1 |
Shortcut, default target is parent File, CreateFolder, or Component's Directory
|
| SymbolPath |
anyType (restriction) |
1..1 |
A path to symbols.
|
| TypeLib |
anyType (restriction) |
1..1 |
Register a type library (TypeLib).
|
|
|
|
|
Referenced By
Definition
<xs:element name="Component">
<xs:annotation>
<xs:documentation>Component for parent Directory</xs:documentation>
<xs:appinfo>
<xse:seeAlso ref="ComponentRef" xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension" />
<xse:seeAlso ref="Media" xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension" />
<xse:msiRef table="Component" href="http://msdn.microsoft.com/library/aa368007.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="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="AppId" />
<xs:element ref="Category" />
<xs:element ref="Class" />
<xs:element ref="Condition" />
<xs:element ref="CopyFile" />
<xs:element ref="CreateFolder" />
<xs:element ref="Environment" />
<xs:element ref="Extension" />
<xs:element ref="File" />
<xs:element ref="IniFile" />
<xs:element ref="Interface" />
<xs:element ref="IsolateComponent" />
<xs:element ref="ODBCDataSource" />
<xs:element ref="ODBCDriver" />
<xs:element ref="ODBCTranslator" />
<xs:element ref="ProgId" />
<xs:element ref="Registry" />
<xs:element ref="RegistryKey" />
<xs:element ref="RegistryValue" />
<xs:element ref="RemoveFile" />
<xs:element ref="RemoveFolder" />
<xs:element ref="RemoveRegistryKey" />
<xs:element ref="RemoveRegistryValue" />
<xs:element ref="ReserveCost" />
<xs:element ref="ServiceControl" />
<xs:element ref="ServiceInstall" />
<xs:element ref="Shortcut" />
<xs:element ref="SymbolPath" />
<xs:element ref="TypeLib" />
<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>Component identifier; this is the primary key for identifying components.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ComPlusFlags" type="xs:integer">
<xs:annotation>
<xs:documentation>
Set this attribute to create a ComPlus entry. The value should be the export flags used
during the generation of the .msi file. For more information see the COM+ documentation
in the Platform SDK.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableRegistryReflection" type="YesNoType">
<xs:annotation>
<xs:documentation>
Set this attribute to 'yes' in order to disable registry reflection on all existing and
new registry keys affected by this component.
When set to 'yes', the Windows Installer calls the RegDisableReflectionKey on each key
being accessed by the component.
This bit is available with Windows Installer version 4.0 and is ignored on 32-bit systems.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Directory" type="xs:string">
<xs:annotation>
<xs:documentation>
Sets the Directory of the Component. If this element is nested under a Directory element,
this value defaults to the value of the parent Directory/@Id.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DiskId" type="xs:integer">
<xs:annotation>
<xs:documentation>
This attribute must be set either on a Component element or all of its children File
elements. 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="Feature" type="xs:string">
<xs:annotation>
<xs:documentation>
Identifies a feature to which this component belongs, as a shorthand for a child
ComponentRef element of the Feature element. The value of this attribute should
correspond to the Id attribute of a Feature element authored elsewhere. Note that
a single component can belong to multiple features but this attribute allows you
to specify only a single feature.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Guid" type="ComponentGuid" use="required">
<xs:annotation>
<xs:documentation>
This value should be a guid that uniquely identifies this component's contents, language, platform, and version.
It's also possible to set the value to an empty string to specify an unmanaged component.
Unmanaged components are a security vulnerability because the component cannot be removed or repaired
by Windows Installer (it is essentially an unpatchable, permanent component). Therefore, a guid should
always be specified for any component which contains resources that may need to be patched in the future.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="KeyPath" type="YesNoType">
<xs:annotation>
<xs:documentation>
If this attribute's value is set to 'yes', then the Directory of this Component is used
as the KeyPath. To set a Registry key or File as the KeyPath of a component, set the
KeyPath attribute to 'yes' on one of those child elements.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Location">
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="local">
<xs:annotation>
<xs:documentation>
Prevents the component from running from the source or the network (this is the default behavior if this attribute is not set).
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="source">
<xs:annotation>
<xs:documentation>
Enforces that the component can only be run from the source (it cannot be run from the user's computer).
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="either">
<xs:annotation>
<xs:documentation>
Allows the component to run from source or locally.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="NeverOverwrite" type="YesNoType">
<xs:annotation>
<xs:documentation>
If this attribute is set to 'yes', the installer does not install or reinstall the
component if a key path file or a key path registry entry for the component already
exists. The application does register itself as a client of the component. Use this
flag only for components that are being registered by the Registry table. Do not use
this flag for components registered by the AppId, Class, Extension, ProgId, MIME, and
Verb tables.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Permanent" type="YesNoType">
<xs:annotation>
<xs:documentation>
If this attribute is set to 'yes', the installer does not remove the component during
an uninstall. The installer registers an extra system client for the component in
the Windows Installer registry settings (which basically just means that at least one
product is always referencing this component). Note that this option differs from the
behavior of not setting a guid because although the component is permanent, it is still
patchable (because Windows Installer still tracks it), it's just not uninstallable.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Shared" type="YesNoType">
<xs:annotation>
<xs:documentation>
If this attribute's value is set to 'yes', enables advanced patching semantics for
Components that are shared across multiple Products. Specifically, the Windows Installer
will cache the shared files to improve patch uninstall. This functionality is available
in Windows Installer 4.5 and later.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="SharedDllRefCount" type="YesNoType">
<xs:annotation>
<xs:documentation>
If this attribute's value is set to 'yes', the installer increments the reference count
in the shared DLL registry of the component's key file. If this bit is not set, the
installer increments the reference count only if the reference count already exists.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Transitive" type="YesNoType">
<xs:annotation>
<xs:documentation>
If this attribute is set to 'yes', the installer reevaluates the value of the statement
in the Condition upon a reinstall. If the value was previously False and has changed to
True, the installer installs the component. If the value was previously True and has
changed to False, the installer removes the component even if the component has other
products as clients.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UninstallWhenSuperseded" type="YesNoType">
<xs:annotation>
<xs:documentation>
If this attribute is set to 'yes', the installer will uninstall the Component's files
and registry keys when it is superseded by a patch. This functionality is available in
Windows Installer 4.5 and later.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Win64" type="YesNoType">
<xs:annotation>
<xs:documentation>
Set this attribute to 'yes' to mark this as a 64-bit component. This attribute facilitates
the installation of packages that include both 32-bit and 64-bit components. If this bit
is not set, the component is registered as a 32-bit component. If this is a 64-bit
component replacing a 32-bit component, set this bit and assign a new GUID in the Guid attribute.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other" processContents="lax">
<xs:annotation>
<xs:documentation>
Extensibility point in the WiX XML Schema. Schema extensions can register additional
attributes at this point in the schema.
</xs:documentation>
</xs:annotation>
</xs:anyAttribute>
</xs:complexType>
</xs:element>