these are samples, not complete applications. The code (and coding style) is not meant to be industrial strength; it's not even well-designed. The sole purpose of the samples is illustrating a point, not teaching proper coding style.
Windows Script is a comprehensive scripting infrastructure for the Microsoft® Windows® platform. Windows Script provides two script engines, Visual Basic® Scripting Edition and Microsoft JScript®, which can be embedded into Windows Applications.