Executing Scripts

After creating a script file, you can run it by double-clicking the file in Windows Explorer, or through a shortcut to the script file. But Windows being what it is, you may suspect that there are at least a half dozen other ways to do the same thing. Indeed, there are.

You can also run scripts from the command line by typing the base name of the script file, without the file extension. For example, after creating the sample script that I discussed earlier in the chapter, you can type hello at the command prompt, and Windows will run the script.

Windowed Versus Command-Line Scripts

At this point, I need to explain that there are two versions of Windows Script Host: a “windowed” version named wscript, and a command-prompt version ...

Get Platinum Edition Using® Microsoft® Windows® XP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.