Windows Scripting Host

What is Windows Scripting Host (WSH) ? Basically it is batch files on steriods or Visual Basic for Batch files. Just like VBA and VBScript it is a subset and extentsion of Visual Basic designed providing access to a variety of resources on the local / remote computer, everything from the Registy to the Network settings, Creating shortcuts to running programs. WSH brings the Windows environment a lot closer to the scripting functionality available to our Unix/Linux cousins using Perl, Sed, Awk, shell scripting and the like. A WSH Script can be written in other language - such as Microsoft JavaScript - but I'll concentrate on VBScript in this section.

If you are familiar with either batch files or Visual Basic - including VBA and VBScript - then WSH should be relatively simple for you to get to grips with, the MSDN WSH site or the MSDN Search Engine provides a whole host of samples and information on WSH, the microsoft.public.inetexplorer.scripting or the microsoft.public.scripting.wsh newsgroups as well as the Dev Guru Reference Site provide a development community to assist when developing WSH and related scripts.

A WSH file is a plain text file containing the WSH commands and should be saved with a .wsf extentsion, although it is more common to see the file extentsion being .vbs for WSH files written in VBScript or .js for WSH files written in Microsoft Javascript. WSH files can be creating in a variety of tools including NotePad and WordPad.

This section of my site contains more information on WSH as well as some detailed worked examples.