A Tech-Head's Take on Scripting

What if you read this book and don't need Chris's column on scripting anymore?

I'm torn. I'm supposed to present a review of a new book written by Tim Hill called Windows 2000 Windows Script Host, but if I tell you how good this book really is, you may decide that you no longer need to read my "Scripting" column! What to do?

Not counting the index, this book consists of 414 pages jam-packed with just about everything you need to know to get familiar and proficient with the Windows Script Host using VBScript. Of course, Hill does, after all, work for Microsoft, so I suppose he'd better have a pretty good idea how the thing works. Let's look at some of the highlights. Whether you're new to scripting or a seasoned tech-head, you'll learn from this book. It starts with the basics but progresses to very, very advanced scripting concepts:

  • WSH 2.0. In addition to covering "standard" WSH 1.0 files, the author delves into the world of WSH 2.0 file formats, which are XML-based and allow you to use multiple languages within a single script. Pretty cool!
  • Components. These really unleash the power of scripting. This book provides in-depth coverage of these little powerhouses: how to put them into your scripts, reference them, and even create your own. That's right, I said create your own components! With VBScript!! You can build your own Windows Script Components (.WSC files), register them with Windows, and reference them from other scripts (or any COM container, such as Internet Explorer). Additionally, built-in WSH components, VBScript objects, and Windows components are also covered in detail.
  • All application development will eventually be component-based. Understanding CBD concepts and techniques is vital if you want to write efficient scripts and avoid re-inventing the wheel every time you need to script a new task. A big chunk of this book dedicates itself to teaching you just that.
  • VBScript. Although you can register just about any scripting engine to work with the WSH, VBScript is by far the most popular scripting language in use today (in the Windows environment, at least). This book provides an extensive look at VBScript, including data-types, functions, arrays, and error-handling.
  • ADSI. The Active Directory Service Interface allows you to use scripts to access AD information, including users, groups, computers, services, and shares. While not a huge part of this book, this chapter provides valuable insight into an important aspect of Win2K.
  • Samples. Every script in the book is available for download from the publisher's Web site at www.macmillantech.com. There's even a TEMPLATE.VBS script that you can use as a starting point for all your scripts.

Anything missing? VBScript was the language of choice for the book. However, since it's titled "Windows Script Host," not "Windows Script Host Using VBScript," it would have been nice to see examples using other languages. At a minimum, there should have been some JScript samples, considering the popularity of Java these days.

I also would have liked to have seen more examples specific to Win2K. After all, the name is in the title. A bit more on ADSI, perhaps. Managing an AD is arguably the biggest challenge to deploying Win2K in your enterprise. Any book on scripting for Win2K should include as much on this topic as possible.

Ultimately, though, these minor shortcomings don't make this book less valuable as a scripting resource. Indeed, if they had been included, I would probably be complaining that the book was too long! Some people you just can't please.

About the Author

Chris Brooke, MCSE, is a contributing editor for Redmond magazine and director of enterprise technology for ComponentSource. He specializes in development, integration services and network/Internet administration. Send questions or your favorite scripts to [email protected].

Featured

comments powered by Disqus

Subscribe on YouTube