Inside the Windows 95 and NT Registry

Last updated August 20, 1996


O'Reilly & Associates has just released its first book for Windows programmers, Inside the Windows 95 Registry by Ron Petrusha (edited by Andrew Schulman). The book also has extensive overage of the registry in Windows NT. This book should be available in bookstores by early September 1996. Right now, you can order the book online.

This web page will be used for updates to the book and as a collection of information on the registry in Windows 95 and Windows NT. Of course, we'll also be advertising the book here. :-)


Click here to order ($32.95 US)

The Complete Guide for Creating Registry-Enabled Applications

The registry is a centralized database for Windows system and application configuration information; its settings control the behavior that appears to be "built in" to Windows and Windows NT. For example, when the user clicks on an executable file, the operating system "knows" to run it based exclusively on data from the registry.

But since its appearance in Windows NT 3.1 and now in Windows 95, the registry was and is a sparsely documented structure that has invited fear, uncertainty, and dread. As a result, many developers have avoided the registry, while others have failed to fully exploit the power of the registry as a database for their applications' configuration information.

Inside the Windows 95 Registry addresses the needs of both groups of developers by demystifying the registry, showing how the Win32 registry API can be used to get information into and out of the registry, and examining the kinds of system, application, and user information that applications can store in the registry. The book features:

The diskette accompanying Inside the Windows 95 Registry features a diverse collection of registry tools and utilities, including:

RegMon: Windows 95 Registry Monitor

Copyright (c) 1996 Mark Russinovich and Bryce Cogswell

RegMon screen shot

Click here to download REGMON.ZIP.

Regmon is a GUI/VxD combination that monitors and displays information about all registry accesses. Since it includes a Virtual Device Driver (VxD) that watches registry activity at the Virtual Machine Manager (VMM) level, it will catch accesses made by all applications, including Windows itself. RegMon will be described in more detail in an article on "Examining the Windows 95 Registry," coming up in the October 1996 issue of Windows Developers Journal.

The tool is useful for a variety of purposes:

Regmon is started by running Regmon.exe from the same directory that regvxd.vxd resides in. Regmon will know the full registry path for any keys that are opened after it has started. The root keys are abbreviated to save screen-space:
ROOTHEY_CLASSES_ROOT
CURRENTHKEY_CURRENT_USER
LOCALHKEY_LOCAL_MACHINE
USERSHKEY_USERS
CONFIGHKEY_CURRENT_CONFIG
DYNDATAHKEY_DYN_DATA

When a registry key is referenced that was opened or created before Regmon was started, Regmon will not be able determine the full registry pathname of the key, and will simply display the hex value of the key.

Implementation

Regmon hooks all VMM registry services so that it can watch requests and their results. Periodically the GUI requests a batch of buffered request information from the VxD for display in the list window.

Because it uses a VxD, RegMon works only in Windows 95. To watch registry activity under NT, see NTRegMon.

Reaching Us

We would appreciate any feedback you have concerning this utility including suggestions and bug reports. Mark can be reached at markr@numega.com, and Bryce can be reached at cogswell@cs.uoregon.edu.

NOTE: this tool is in no way connected with, or endorsed by, Nu-Mega Technologies or the University of Oregon.


NTRegMon: Windows NT Registry Monitor

Copyright (c) 1996 Mark Russinovich and Bryce Cogswell

NTRegMon screen shot

Click here to download NTREGMON.ZIP.

NTRegMon is a Windows NT GUI/device driver combination that intercepts and displays information about all registry activity on a Windows NT system. All access types are listed along with the full registry pathname being accessed and any values that are read or written. Return values, such as key names returned by EnumerateKey, and registry key object addresses that are returned by CreateKey, are also displayed.

Installation and Usage

Running NTRegMon is as easy as typing "ntregmon" in the install directory. The NTRegMon device driver, REGSYS.SYS, is automatically loaded and then unloaded when NTRegMon exits.

To run NTRegMon, your account must have device-driver loading privileges (which are usually only applied to administrator accounts).

Root key names are abreviated to preserve screenspace with the following translations:
ROOTHEY_CLASSES_ROOT
MACHINEHKEY_LOCAL_MACHINE
USERSHKEY_USERS
CONFIGHKEY_CURRENT_CONFIG

Implementation

NTRegmon watches registry activity using a new system monitoring technique that we have developed. The details of this technique, which allow monitoring of many more system events than previously though possible, are forthcoming in our book, Windows NT Internals, which will be published next Spring by IDG Books.

Reaching Us

Mark can be reached at markr@numega.com and Bryce can be reached at cogswell@cs.uoregon.edu.

Enter your email address to receive email when this page is updated (on approximately a weekly basis). This uses the free URL-minder service ("Your own personal web robot!") from NetMind.
Your Internet email address:


Visit these O'Reilly online areas:

ORA Home Our homepage, with product information, feature articles, and more.

WebSite Home WebSite Central, home of O'Reilly's hot, new, Windows Web server.

ORA Windows The O'Reilly Windows Center has Win 95 programming information, articles, and links.