Previous Section Table of Contents Next Section

Chapter 11. Built-in Scripting Objects

IN THIS CHAPTER

You've now seen most of the VBScript language, so it's time to start working with those "objects" that you've heard so much about. I'll begin with the objects that are built into the scripting engine itself, and you'll find that they're quite useful in a number of situations.

I've already described how VBScript's real value is as a sort of electronic "glue," which you can use to piece together the many objects of the Windows operating system. Windows Management Instrumentation (WMI) and Active Directory Services Interface (ADSI) are good examples of operating system functionality that you can access by using VBScript. The Windows Script Host (WSH) even has its own built-in object library, and these objects allow you to perform some powerful tasks.

In this chapter, you'll learn to use the WSH Network object, which provides access to the computer's network environment; the Shell object, which allows you to manipulate Explorer and other shell-related information; and the Shortcut object, which allows you to work with Explorer shortcuts and Internet links.

All of these objects can be used in a wide variety of situations, but I think you'll find them more useful in logon scripts. The Network object, for example, allows you to map network drives and printers, which is perhaps the most common job of a logon script.

Chapter 29 contains additional logon script examples for both NT and Active Directory domains, and includes some suggestions for using logoff scripts.

    Previous Section Table of Contents Next Section