Windows Script Files in Action
Learn how to use XML-based WS files to create a powerful scripting framework
April 25, 2000
XML-based Windows Script files belong in your toolbox
In "Extensible Markup Language," April 2000, I introduced the new XML-based Windows Script (WS) files, which Microsoft Windows Script Host (WSH) 2.0 registers with a .wsf extension. I examined the WS files' XML schema and each element's syntax, definition, and usage. Now let's look at the new capabilities and benefits that WS files provide and put this knowledge to work.
WSH 2.0 Features
Before I dive into the code, let's recap several WSH 2.0 features. The XML-based WS files provide the following top WSH 2.0 capabilities.
Include file support. The include file capability lets you place commonly used code in a separate file or files, then reference the file (or files) in other scripts. The separate file's code becomes available to the script that contains the include directive. The External constants support. WSH 2.0 uses the element to support external constants. This feature lets you use mnemonic constants defined in objects outside the script engine. For example, you no longer need to redefine constants that ActiveX Data Objects (ADO), the FileSystemObject, and Windows Management Instrumentation (WMI) already define.Multiple languages support. WSH 2.0 provides support for multiple languages so that you can use several languages inside one WS file. The The WSH 2.0 lets you use the
About the Author
You May Also Like