COM Registration Settings

InstallShield 2019 » Advanced Settings for a Component

Project • The COM Registration area for a component is available in the following project types:

Basic MSI
DIM
InstallScript MSI
Merge Module
MSI Database
MSM Database
Transform

The COM Registration area under the Advanced Settings node of the Components view and the Setup Design view is organized into the following categories:

COM Classes
ProgIDs
Type Libraries

COM Classes

When you select a COM class in the COM Registration area of the Components view or the Setup Design view, the following settings are available:

COM Class Settings

Setting

Description

ProgID

Select a ProgID for this COM class from the list of ProgIDs created for this COM server.

You can also create a ProgID by typing a new name; if you do this, InstallShield adds the new ProgID under the ProgIDs node.

File Type Mask

Enter the file type mask in the following format:

offset, cb, mask, value

offset—The position, in bytes, from the beginning of the file, indicating where the byte range begins. Number of bytes from the end of the file if the offset value is a negative integer.
cb—The number of bytes in the file, starting from the offset value, that will be used to perform a logical AND operation with the mask.
mask—A value that is used to perform a logical AND operation with the bits in the file so that the result can be compared with a specified value (the next entry). If you leave this value empty, it is assumed to be all ones.
value—The bytes that will be compared with the result of a logical AND operation between the mask and the byte range in a file in order to determine the file's class ID.

A file type mask is part of a pattern registered under HKEY_CLASSES_ROOT\FileType\CLSID\pattern. Windows APIs such as OleCreateFromFile and GetClassFile can retrieve a class ID for a file by comparing information in this key to the bytes in the file. For example, 0,4,FFFFFFFF,AABBCCDD would mean that the first four bytes in the file must be AA BB CC DD for the system to use this component’s class ID for a specified file.

You can specify more than one mask that the file has to match. Separate multiple patterns with a semicolon (;). When the installation creates these keys, the subkeys for each pattern are automatically numbered sequentially starting with the number 0.

Icon File

Enter the fully qualified path to the file that contains the icon associated with this COM class, or click the ellipsis button (...) in this setting to browse to the path.

You can specify an .ico, .exe, or .dll file. An icon will be extracted from the file for you if you browse for an executable file or DLL and select a specific icon.

Icon Index

If there is more than one icon resource in the file, enter the index for the appropriate icon.

A nonnegative integer refers to the order of the icon resources in the executable file. For example, 0 is for the first icon in the file, 1 for the second, 2 for the third, and so on.

Use a negative number to refer to a specific resource ID. For example, the icon index -12 points to the icon with a resource ID of 12.

AppID

Select an AppID for this DCOM or COM+ class from the list of AppID names that you have already created for this file's registration.

An AppID is a GUID that is registered under HKEY_CLASSES_ROOT\AppID used for grouping all of the security and configuration options of distributed COM objects.

To create a new AppID, you need to use the Direct Editor: Navigate to the AppID table and enter the information for your new AppID. Once you have created an AppID, you can select it from the list in this setting.

To permanently delete an AppID, delete its row in the AppID from within the Direct Editor.

Description

Enter a description for this COM class.

When you type a value for this setting, you are creating a string entry and setting its initial value for all of the languages that are currently in the project. As an alternative to typing a new value, you can click the ellipsis button (...) in this setting to select an existing string. For more information, see Using String Entries in InstallShield.

Relative Path

Specify whether you want to register a relative path to the file under its class ID. Available options are:

No—The installation registers the fully qualified path to the file under its class ID. Then, when any client application instantiates an object from this class, the system always points to the registered COM server. This is the default option.
Yes—The installation registers only the name of the file without any path. Doing so allows you to install side-by-side components, meaning that the operating system uses the copy of the COM server in the current directory and that other applications can maintain separate copies of the file in their respective folders.

Note • If the path is relative and the file is not in the system’s path, the operating system will not be able to find the class when a client attempts to create an object outside of the server's current directory.

When you select a LocalServer32, LocalServer, or InprocServer32 context type under a COM class in the COM Registration area of the Components view or the Setup Design view, the following settings are available:

COM Class Context Settings

Setting

Description

Default Inproc Handler

Select the InprocHandler value for this LocalServer or LocalServer32 context type.

Argument

Enter the argument that OLE will use when calling this COM server.

ProgIDs

When you select a ProgID in the COM Registration area of the Components view or the Setup Design view, the following settings are available:

ProgID Settings

Setting

Description

COM Class

Select the COM class, if any, to which this ProgID refers.

If you later change the class ID (CLSID) for the COM class, you will need to select it again from the list to restore the association.

Description

Enter a description of this ProgID.

The description is registered as the default value for the ProgID under the registry key HKEY_CLASSES_ROOT\class.object when this component is installed. When the user right-clicks a file associated with your file extension and then clicks Properties, the General tab displays the description that you enter here.

When you type a value for this setting, you are creating a string entry and setting its initial value for all of the languages that are currently in the project. As an alternative to typing a new value, you can click the ellipsis button (...) in this setting to select an existing string. For more information, see Using String Entries in InstallShield.

Icon File

Enter the fully qualified path to the file that contains the icon associated with this ProgID, or click the ellipsis button (...) in this setting to browse to the path.

You can specify an .ico, .exe, or .dll file. An icon will be extracted from the file for you if you browse for an executable file or DLL and select a specific icon.

Icon Index

If there is more than one icon resource in the file, enter the index for the appropriate icon.

A nonnegative integer refers to the order of the icon resources in the executable file. For example, 0 is for the first icon in the file, 1 for the second, 2 for the third, and so on.

Use a negative number to refer to a specific resource ID. For example, the icon index -12 points to the icon with a resource ID of 12.

When you select a version-independent ProgID in the COM Registration area of the Components view or the Setup Design view, the following settings are available:

Version-Independent ProgID Settings

Setting

Description

Description

Enter a description of this version-independent ProgID.

The description is registered as the default value for the version-independent ProgID under its root key (HKEY_CLASSES_ROOT\version-independent ProgID) when this component is installed.

When you type a value for this setting, you are creating a string entry and setting its initial value for all of the languages that are currently in the project. As an alternative to typing a new value, you can click the ellipsis button (...) in this setting to select an existing string. For more information, see Using String Entries in InstallShield.

Type Libraries

When you select a type library in the COM Registration area of the Components view or the Setup Design view, the following settings are available:

Type Library Settings

Setting

Description

Locale ID

Enter the decimal value of the type library's locale ID.

Since type libraries are usually language-neutral, the number zero is the most common language of type libraries.

Version

Provide the version number of the type library. If this setting is left blank, Windows Installer automatically determines the version of the type library at run time.

Windows Installer requires the type library version to be in the format x.y, where x and y are decimal (base-10) integers.

Cost

Enter the cost that is associated with registering this type library. Use non-negative numbers only. Enter the number 1 if no specific value is available.

Help Path

Select the destination folder where the help file for this type library will be installed, or click the ellipsis button (...) to select or create a directory.

To use the component’s default destination directory, select [INSTALLDIR].

Description

Enter a description of this type library.

When you type a value for this setting, you are creating a string entry and setting its initial value for all of the languages that are currently in the project. As an alternative to typing a new value, you can click the ellipsis button (...) in this setting to select an existing string. For more information, see Using String Entries in InstallShield.

See Also