1. Home
  2. Computing & Technology
  3. Visual Basic

VBScript - The System Administrator's Language - Part 1

By Dan Mabbutt, About.com

3 of 6

Clearing up some "points of confusion"

Another point of confusion is that there are three versions of WSH and two implementations. Windows 98 and Windows NT 4 implemented version 1.0. Version 2.0 was released with Windows 2000 and the current version is numbered 5.6. You can download WSH Version 5.6 for Windows 98 and later free from Microsoft.

The two implementations are one that works from a DOS command line (called "CScript" for Command Script) and one that works in Windows (called "WScript"). You can use CScript only in a DOS command window, but it's interesting to note that much of the real world computer systems administration still works that way. It might also be confusing to discover that the WScript object is essential to a lot of code that is normally run in CScript. The example shown later uses the WScript object, but you can run it with CScript. Just accept it as maybe being slightly odd, but that's the way it works.

If WSH is installed, you can run a VBScript program by simply double-clicking on any file that has the vbs extension and that file will be executed by WSH. Or, for even more convenience, you can schedule when a script will run with Windows Task Scheduler. In partnership with Task Scheduler, Windows can run WSH and a script automatically. For example, when Windows starts, or every day at a particular time.

Explore Visual Basic
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic
  4. Learn VB 6
  5. Learn VBScript
  6. VBScript - The System Administrator's Language - Part 1

©2009 About.com, a part of The New York Times Company.

All rights reserved.