[Previous] [Table of Contents] [Next]

Chapter 7

Working with WSH Objects

In Chapter 6, we covered the basics of script programming and examined some examples that use objects, methods, and properties. In this chapter, we'll discuss how to use Microsoft Windows Script Host (WSH) to automate certain tasks. You'll learn how to read the properties of the WScript object and display them in a dialog box so that you can retrieve important information from WSH and the current script or access environment variables in your operating system. You'll also learn how to access the arguments passed to a WSH script and use methods such as CreateObject and GetObject to create object instances. Finally, you'll find out how to launch an external application from a script by using the Run method.