CreateObject

InstallShield 11 » InstallScript Language Reference

In InstallScript projects, the CreateObject function is equivalent to CoCreateObject.

The CreateObject function initializes the registered COM object named by szProgID and returns a reference that can be assigned to a variable of type OBJECT by using the set keyword.

To check whether the object was initialized successfully, you can use the keywords trycatchendcatch for more control over exception handling for COM objects.

Note

The COM object must be registered on the target system in order for CreateObject to work.

Syntax

CreateObject ( szProgID );

Parameters

Parameter Description
szProgID Specifies the ProgID of the COM object to be initialized.

Return Values

A reference that can be assigned to a variable of type OBJECT by using the set keyword.