Making Use of the Windows Scripting Host

Every script presented so far in this book has used the Windows Scripting Host (WSH) in two ways. First, each has quite literally been run by WSH. WSH has opened a file containing VBScript code and passed the data on to the VBScript runtime engine. Second, we have made use of several COM objects provided at runtime by WSH, the most obvious being WScript, whose Echo() method has appeared in literally every one of our scripts. In this light, the section title “Making Use of the Windows Scripting Host” may seem rather strange. After all, we have being doing just that all along! However, there is rather more to WSH than first meets the eye. Not only can its runtime behavior be usefully modified with a number ...

Get Windows Management Instrumentation (WMI) 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.