O'Reilly logo

Managing The Windows 2000 Registry by Paul Robichaux

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

reg: The One-Size-Fits-All Registry Tool

I have been heard to describe the reg.exe utility as "RegEdt32 in a can.” It does almost everything RegEdt32 can do, but it allows you to do it from a command line. Not only is this a boon when you want to quickly make a change without firing up RegEdt32 ; it also allows you to embed Registry operations in logon scripts and batch files. (Of course, you learned how to use the Registry from within Perl in Chapter 8, but for the non-Perl-hackers among us, reg is a welcome substitute.)

If you’ve ever used the net command, you’ll immediately recognize how reg works. Like net, you use reg by giving it a command from a short list of options (query, add, delete, copy, save, load, unload, restore, compare, export, and import), followed by one or more optional parameters that the command you specify interprets. Here’s a short example in which reg gets the query command for a specified subkey of HKLM:

C:\reskit>reg query HKLM\Software\Qualcomm /s

Listing of [Software\Qualcomm]

[Eudora]
[Eudora\3.0.1]

Here’s the problem with reg: the Windows 2000 and NT versions have different command-line parameters and switches. In an effort to do away with the clutter of multiple tools, Microsoft revamped the interface for the Windows 2000 reg tool, making it more functional and more consistent, not to mention unlike its older brother.

Using the Windows 2000 Version of reg

The Windows 2000 version of reg.exe offers 11 separate functions, ranging from querying for the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required