Conventional wisdom holds that the Windows Scripting Host (WSH) provides the graphical equivalent of the humble DOS batch file. Although this assertion has an element of truth, looking at WSH as a mere batch file replacement sells it short. WSH scripts can easily read and write to files--tasks that your garden-variety batch files can't handle. You just have to know how to use ActiveX objects to bring additional functionality into the WSH environment.
As Michael Otey pointed out in "An Introduction to WSH" (December 1998), WSH is a script processor that can support multiple scripting languages. WSH natively supports Visual Basic Script (VBScript) and JScript, but it can also support just about any other scripting environment, provided a clever programmer has written a processing engine and made the proper file associations. Programmers have already accomplished these tasks for the Perl and Python script languages.
Deciding which language to use depends on personal preference. (For more information about two commonly used scripting languages, see the sidebar "The Pros and Cons of Perl and VBScript," page 2.) In this article, I'm using VBScript, because Windows power users and developers often use it. More important, you can easily push VBScript beyond your usual expectations by using ActiveX objects to create simple applications. Built on the Component Object Model (COM), ActiveX is a technology that lets software components interact with one another, no matter what language the software developers used. In other words, ActiveX provides language-neutral objects that you can use with any scripting language. In this article, I'll show you how to use an ActiveX object to create a basic revision control system. After I explain how this application operates, I'll describe how the ActiveX object works and how to use it in scripts. . . .
suman kalyan dey December 16, 2003