Site hosted by Angelfire.com: Build your free website today!
Chapter 40: Automating Tasks with the Windows Script Host

PreviousChapterContentsGlossaryNext

Running Scripts from Windows

To run a script, just open the script's icon or filename in Windows Explorer or from the desktop. The Wscript program, which is part of WSH and is stored in the C:\Windows folder (or whatever folder you installed Windows in), runs the script. Alternatively, you can choose Start | Run, type the full pathname of the script you want to run, and click OK.

Wscript is registered (using Windows file associations) to run VBScript (with the extension .vbs) and JavaScript (with the extension .js) scripts. If you want to use Wscript to run scripts with other extensions, run the script's icon or filename or type its filename into the Run dialog box. If Windows displays an Open With dialog box, you can tell Windows to run all scripts of this type using Wscript. Choose C:\Windows\System32\Wscript.exe in the Open With dialog box and select the Always Use This Program To Open This File check box. In addition to running the script you specified, Windows registers Wscript to be the program used to open all files with this extension.

PreviousChapterContentsGlossaryNext