Chapter 14: Automating Registry Management with WSH

Overview

R is for Rocket.

Ray Bradbury

When it comes to software development and distributing the applications to end-users, the Registry Editor is only suitable for testing purposes. Setup programs, REG files, and INF files provide more capabilities for convenient and safe registry modification. Furthermore, if you are going to automate Windows and introduce registry modifications at the speed of a rocket, you'll certainly appreciate the script usage.

In Chapter 10 we already touched the problem and even provided a small code excerpt, which illustrated the usage of WSH. Introduced with Windows 2000, WSH is capable of creating simple, but flexible and powerful scripts to automate network administration. Because WSH is language-independent, you're free to select any scripting language you prefer: Visual Basic Scripting Edition (VBScript), JScript, or Perl. WSH also supports COM, allowing you to enjoy the advantages of new technologies such as Windows Management Instrumentation (WMI).

Now, the time has come to consider this topic in more detail. Of course, it is impossible to provide a detailed description of WSH, WMI, or scripting languages, such as VBScript or Jscript, within a single chapter (after all, each of these topics deserves a separate book, and quite a comprehensive one, since I encountered volumes of JScript and Perl that comprised more than 1500 pages). Therefore, if you want a detailed language reference, simply buy one of those books at your local bookstore.

However, we will consider the registry-related topics, and, in particular, the RegRead, RegWrite, and RegDelete methods provided by WSH. We will also consider their practical usage and provide several simple, but useful scripts.



Windows XP Registry
Linux Enterprise Cluster: Build a Highly Available Cluster with Commodity Hardware and Free Software
ISBN: N/A
EAN: 2147483647
Year: 2000
Pages: 144
Authors: Karl Kopper

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net