CREATEOBJECT

Action

CreateObject launches (if necessary) the OLE Automation server and returns a handle through which an OLE Automation object can be manipulated.

 

Syntax

CREATEOBJECT ("serverclassname.typename")

 

Parameters

ServerClassName

The name of the application providing the object.

TypeName

The type or class of the object to create.

 

Returns

If the function succeeds it returns the handle to the object. If the function fails, it returns 0.

Example

$ObjectHandle = CreateObject("WScript.Shell")