Class Element
- Description
-
COM Class registration for parent Component.
- Windows Installer references
- Class Table, ProgId Table, Registry Table, AppId Table
- Parents
- AppId, Component, File, Include, TypeLib
- Inner Text
- None
- Children
- Choice of elements (min: 0, max: unbounded)
- FileTypeMask (min: 0, max: unbounded)
- Interface (min: 0, max: unbounded): These Interfaces will be registered with the parent Class and TypeLib (if present).
- ProgId (min: 0, max: unbounded): A ProgId associated with Class must be a child element of the Class element
- Attributes
-
Name Type Description Required Id Uuid The Class identifier (CLSID) of a COM server. Yes Advertise YesNoType Set this value to "yes" in order to create a normal Class table row. Set this value to "no" in order to generate Registry rows that perform similar registration (without the often problematic Windows Installer advertising behavior). AppId Uuid This attribute is only allowed when a Class is advertised. Using this attribute will reference an Application ID containing DCOM information for the associated application GUID. The value must correspond to an AppId/@Id of an AppId element nested under a Fragment, Module, or Product element. To associate an AppId with a non-advertised class, nest the class within a parent AppId element. Argument String This column is optional only when the Context column is set to "LocalServer" or "LocalServer32" server context. The text is registered as the argument against the OLE server and is used by OLE for invoking the server. Note that the resolution of properties in the Argument field is limited. A property formatted as [Property] in this field can only be resolved if the property already has the intended value when the component owning the class is installed. For example, for the argument "[#MyDoc.doc]" to resolve to the correct value, the same process must be installing the file MyDoc.doc and the component that owns the class. Context List The server context(s) for this server. This attribute's value should be a space-delimited list containg one or more of the following: - LocalServer
- A 16-bit local server application.
- LocalServer32
- A 32-bit local server application.
- InprocServer
- A 16-bit in-process server DLL.
- InprocServer32
- A 32-bit in-process server DLL.
Yes Control YesNoType Set this attribute's value to 'yes' to identify an object as an ActiveX Control. The default value is 'no'. See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/com/htm/reg_2fn0.asp for more information. Description String Localized description associated with the Class ID and Program ID. Handler String The default inproc handler. May be optionally provided only for Context = LocalServer or LocalServer32. Value of "1" creates a 16-bit InprocHandler (appearing as the InprocHandler value). Value of "2" creates a 32-bit InprocHandler (appearing as the InprocHandler32 value). Value of "3" creates 16-bit as well as 32-bit InprocHandlers. A non-numeric value is treated as a system file that serves as the 32-bit InprocHandler (appearing as the InprocHandler32 value). Icon String The file providing the icon associated with this CLSID. Reference to an Icon element (should match the Id attribute of an Icon element). This is currently not supported if the value of the Advertise attribute is "no". IconIndex Integer Icon index into the icon file. Insertable YesNoType Specifies the CLISD may be insertable. Programmable YesNoType Specifies the CLSID may be programmable. RelativePath YesNoType When the value is "yes", the bare file name can be used for COM servers. The installer registers the file name only instead of the complete path. This enables the server in the current directory to take precedence and allows multiple copies of the same component. SafeForInitializing YesNoType May only be specified if the value of the Advertise attribute is "no". SafeForScripting YesNoType May only be specified if the value of the Advertise attribute is "no". Server String May only be specified if the value of the Advertise attribute is "no". File Id of the COM server file. If this element is nested under a File element, this value defaults to the value of the parent File/@Id. ThreadingModel Enumeration Threading model for the CLSID. This attribute's value should be one of the following: - apartment
- free
- both
- neutral
- single
- rental
Version String Version for the CLSID. - Remarks
- When being used in unadvertised mode, the attributes in the Class element correspond to registry keys as follows (values that can be specified in authoring are in bold):
- Id/Context/Server
- In General
- [HKCR\CLSID\{Id}\Context1]
@="[!Server]"
[HKCR\CLSID\{Id}\Context2]
@="[!Server]" - Specific Example
- [HKCR\CLSID\{01234567-89AB-CDEF-0123-456789ABCDEF}\LocalServer]
@="[!comserv.dll]"
[HKCR\CLSID\{01234567-89AB-CDEF-0123-456789ABCDEF}\LocalServer32]
@="[!comserv.dll]"
- AppId
- In General
- [HKCR\CLSID\{Id}]
AppId="{AppId}" - Specific Example
- [HKCR\CLSID\{01234567-89AB-CDEF-0123-456789ABCDEF}]
AppId="{00000000-89AB-0000-0123-000000000000}"
- Argument
- In General
- [HKCR\CLSID\{Id}\Context]
@="[!Server] Argument" - Specific Example
- [HKCR\CLSID\{01234567-89AB-CDEF-0123-456789ABCDEF}\LocalServer32]
@="[!comserv.dll] /arg1 /arg2 /arg3"
- Control
- In General
- Value "yes" specified:
[HKCR\CLSID\{Id}\Control] - Specific Example
- [HKCR\CLSID\{01234567-89AB-CDEF-0123-456789ABCDEF}\Control]
- Description
- In General
- [HKCR\CLSID\{Id}]
@="Description" - Specific Example
- [HKCR\CLSID\{01234567-89AB-CDEF-0123-456789ABCDEF}]
@="Description of Example COM Component"
- Handler
- In General
- Value "1" specified:
[HKCR\CLSID\{Id}\InprocHandler]
@="ole.dll"
Value "2" specified:
[HKCR\CLSID\{Id}\InprocHandler32]
@="ole32.dll"
Value "3" specified:
[HKCR\CLSID\{Id}\InprocHandler]
@="ole.dll"
[HKCR\CLSID\{Id}\InprocHandler32]
@="ole32.dll"
Other value specified:
[HKCR\CLSID\{Id}\InprocHandler32]
@="Handler" - Specific Example (for other value)
- [HKCR\CLSID\{01234567-89AB-CDEF-0123-456789ABCDEF}\InprocHandler32]
@="handler.dll"
- Icon/IconIndex
- This is not currently handled properly.
- Insertable
- In General
- Value "no" specified:
[HKCR\CLSID\{Id}\NotInsertable]
Value "yes" specified:
[HKCR\CLSID\{Id}\Insertable] - Specific Example
- [HKCR\CLSID\{01234567-89AB-CDEF-0123-456789ABCDEF}\Insertable]
- Programmable
- In General
- Value "yes" specified:
[HKCR\CLSID\{Id}\Programmable] - Specific Example
- [HKCR\CLSID\{01234567-89AB-CDEF-0123-456789ABCDEF}\Programmable]
- RelativePath
- Unsupported. Please contribute this back to WiX if you know.
- SafeForInitializing
- In General
- Value "yes" specified:
[HKCR\CLSID\{Id}\Implemented Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}] - Specific Example
- [HKCR\CLSID\{01234567-89AB-CDEF-0123-456789ABCDEF}\Implemented Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}]
- SafeForScripting
- In General
- Value "yes" specified:
[HKCR\CLSID\{Id}\Implemented Categories\{7DD95801-9882-11CF-9FA9-00AA006C42C4}] - Specific Example
- [HKCR\CLSID\{01234567-89AB-CDEF-0123-456789ABCDEF}\Implemented Categories\{7DD95801-9882-11CF-9FA9-00AA006C42C4}]
- ThreadingModel
- In General
- [HKCR\CLSID\{Id}\Context]
ThreadingModel="ThreadingModel" - Specific Example
- [HKCR\CLSID\{01234567-89AB-CDEF-0123-456789ABCDEF}\LocalServer32]
ThreadingModel="Apartment"
- TypeLibId (from parent TypeLib/@Id)
- In General
- [HKCR\CLSID\{Id}\TypeLib]
@="{TypeLibId}" - Specific Example
- [HKCR\CLSID\{01234567-89AB-CDEF-0123-456789ABCDEF}\TypeLib]
@="{11111111-89AB-1111-0123-111111111111}"
- Version
- In General
- [HKCR\CLSID\{Id}\Version]
@="Version" - Specific Example
- [HKCR\CLSID\{01234567-89AB-CDEF-0123-456789ABCDEF}\Version]
@="1.0.0.0"
- See Also
- Wix Schema, AppId