Script Runtime Overview
Microsoft® Windows® 2000 Scripting Guide
The two primary Microsoft scripting languages, Microsoft® Visual Basic® Scripting Edition (VBScript) and Microsoft® JScript®, were originally developed as client-side scripting languages for Microsoft® Internet Explorer. Because of this, a number of limitations were specifically built into each language. For example, neither VBScript nor JScript has inherent methods for performing file management tasks such as copying, moving, or deleting files. This was done to protect consumers: Most visitors to a Web site would not appreciate having a script on a Web page begin deleting files from their hard drives.
However, scripting began to rapidly evolve from a client-side technology used primarily for such things as HTML "rollovers" (for example, changing the color of a font when you pass the mouse over a hyperlink). With the advent of Active Server Pages, Web developers required the ability to perform file management on the server. With the advent of Windows Script Host (WSH), system administrators required the ability to perform file management outside the Web browser.
In response to these needs, Microsoft released the Script Runtime library. The Script Runtime library is a single dynamic-link library (DLL), scrrun.dll, that provides script writers with a number of file system management capabilities, including the ability to:
Retrieve information about the file system, including disk drives, files, and folders.
Copy, move, and delete files and folders.
Create, read from, and write to text files.
In addition to these file management capabilities, the Script Runtime library also features the ability to create dictionaries (data structures that function similar to collections) and to encode scripts, effectively shielding the code from prying eyes.
Note
- This chapter discusses the FileSystemObject (used for file management) and the Dictionary object, but not the Script Encoder object.
The Script Runtime library is a part of Windows® 2000. The Script Runtime library is also installed anytime you install or upgrade a number of Microsoft applications, including the following:
Windows Script Host
VBScript
Internet Explorer
Microsoft Office