An essential feature of Windows Script Host (WSH) is the Windows Script File (WSF) format, which Microsoft introduced in 1999 as part of WSH 2.0. Since then, WSF has proved to be helpful and powerful, but it's not a widely used feature, primarily because of the cumbersome XML syntax that surrounds the code. The beauty of WSH is its immediateness and intuitive code, which requires only a text editor and a console. XML adds an extra layer of code and requires an additional step when you write a script. At first sight, the WSF format seems more of a complication than a real help for script developerswhich is probably true if you only write and use simple scripts comprising a few calls. However, the more complex your scripts get, the more you need sophisticated tools, such as importable libraries of script functions, customizable resources, and predefined constants. The WSF format supports many additional features without touching the languages' syntax.
In this article, I use some quick and effective sample scripts to introduce you to the advantages of the WSF format. I also show you a handy tool that automatically translates existing VBScript and JScript code into a .wsf file. . . .