[Previous] [Table of Contents] [Next]

# Available Objects

When you write scripts, you can use any of the Component Object Model (COM) objects installed on the target machine. This is a huge collection of objects exposed from WSH, Microsoft Windows, Microsoft Office, Microsoft ActiveX controls, and so on. These objects must be registered on the local system. WSH uses the programmatic identifier (ProgID) of an object in the script to create the object reference.

If you need additional objects, you can create them yourself. The easiest approach is to use Microsoft Windows Script Components (WSC). Or you can use Microsoft Visual Basic 5 Control Creation Edition (CCE), for example, to create your own ActiveX objects to extend WSH. A discussion of this technique is beyond the scope of this book, but you'll find that I cover WSC and the Visual Basic CCE in Advanced Development with Microsoft Windows Script Host 2.0. You can also use C++, Active Template Library (ATL), Visual Basic, and other languages and tools.

## Getting Information About Objects, Methods, and Properties

One problem with using objects in WSH scripts is that some programmers don't supply documentation with their objects. To get information about the COM objects or ActiveX controls registered on your system, you can use the Microsoft OLE/COM Object Viewer. In addition, the Object Browser supplied with Microsoft's development environments shows the methods and properties exposed by objects. You can find out more about the OLE/COM Object Viewer and the Object Browser in Advanced Development with Microsoft Windows Script Host 2.0.

> NOTE

> In later chapters, I'll go into more detail about several objects and show samples that use objects and their properties.