Editor's note: This is the first of a continuing interactive series on scripting that will appear on SearchWinSystems.com on a regular basis. Christa Anderson, a noted authority on the subject, will explain basic scripting concepts and then move on to teach you how to use VBScript to perform common tasks. You can e-mail your questions to
Each line in a script is a statement that tells the computer what to do next.
Executable statements, the statements that have some result, usually have a simple verb-object form. A conditional statement would outline the conditions under which the verb-object combination applies.
Nonexecutable portions of a script are called comments; they're preceded with the word "Rem" or an apostrophe. Comments document the script for future reference. You can also add Rem or an apostrophe to the beginning of an executable line to disable that line for debugging purposes.
The scripting host interprets lines of code from left to right and top to bottom, so you can, for example, gather information in line 10 of the script, then manipulate that information in line 30. Procedures, collections of statements that run only when the script calls them, are the exception to this rule. They don't run until and unless they're called, and then they execute immediately, regardless of their physical position in the script.
Beginner's guide to scripting
Objects, properties and methods
Scripting hosts and the interpreter
How are scripts interpreted?
Data types you'll use
|ABOUT THE AUTHOR:|
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.