Scripting School: Find objects with Windows Script Host

Article

Scripting School: Find objects with Windows Script Host

Christa Anderson, Contributor

If you script without objects you will quickly find that your options are fairly limited--unless you're content to work only with user input and never store anything even temporarily.

Now that we've started working with objects in the past two columns, the question is, how do you know if an object exists in a script if you haven't already seen an object in a script?

That was the question a clever reader posed to me recently. It was an especially good question in light of the many sources of objects that I've alluded to in my first couple of columns.

Scripting languages such as VBScript have several sources of objects: the Windows Script Host itself, the file system and VBScript (for scripts written in VBScript, anyway). There are also Windows Management Instrumentation (WMI) and Active Directory Services Interface (ADSI) objects, which describe a single computer and the contents of the directory services, respectively. WMI and ADSI will become even more powerful as time goes on, since Microsoft is putting substantial effort into expanding the way these object models are used to describe systems.

I briefly introduced objects, properties and methods in my first column, a beginner's guide to scripting. The next few columns will give you more background on the various

    Requires Free Membership to View

    By submitting your registration information to SearchWindowsServer.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchWindowsServer.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

sources of objects, and point you to some online resources.

Let's start with the Windows Script Host itself.


Scripting School: Find objects with Windows Script Host
- Introduction
- Windows Script Host objects
- Wscript.Arguments
- Network resources and user/computer identity
- Running external scripts
- Working with the environment
- Summary

Read all of Christa's scripting columns:
April 2005: Beginner's guide to scripting
May 2005: It's time to increase your scripting expertise
June 2005: Connect users to network resources
July 2005: More on connecting to network resources
August 2005: Find objects with Windows Script Host
September 2005: Windows Script Host arguments
October 2005: Scripting School: Turning the environment with WshShell

When Christa Anderson began working with Windows Server operating systems in 1992, she became increasingly interested in finding more efficient and flexible ways of performing routine tasks. Christa has written extensively about administrative scripting and taught technical sessions on the subject at conferences such as Comdex and CeBIT, helping people who had never done any scripting to write their own scripts in half a day. In addition to her interest in scripting Windows management, Christa is an authority on server-based computing and the program manager for Terminal Services licensing in Longhorn. If you have a scripting question for Christa, please e-mail her at scripting@SearchWinSystems.com.

 


Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.