Microsoft® Windows® Script Host
<object> Element
WSH Reference
Version 2


Description
XML element used in Windows Script component files that defines objects that can be referenced by script.
Syntax
<object id="objID" [classid="clsid:GUID" | progid="progID"] />

Parameters
Part Description
objID A name by which the object can be referenced in your script. Object ID values must begin with a letter and can include letters, digits, and underscores (_). The object ID must be unique throughout the scope of the Windows Script Component. For example, if you specify the name CObj, you can reference the object in your script as follows:
x = CObj.Prop1
GUID (Optional) A reference to the class ID (GUID) under which the object has been registered. Use "clsid:" followed by the class ID (without braces). You must specify either a classid or a progid attribute, as in the following example:
classid="clsid:2154c700-9253-11d1-a3ac-0aa0044eb5f"
progID (Optional) The program ID of the object, which can be specified as an alternative to the class ID. You must specify either a classid or a progid attribute.
Remarks
The <object> element provides a way to expose objects globally for use in scripting within the Windows Script Component without using functions such as CreateObject(). Using an <object> element makes the object available with global scope and enables scripting tools to provide statement completion for the object's members.