NT RegFind - a Win32 registry search utility

This document was written by the author and is presented here without modification. No Warranties of any kind are made.

1. Introduction

Regfind is a utility for searching through a win32 registry. This is the first version of the program and is meant for use with NT. It has been tested with NT 3.5 beta 2. It started off as a perl utility for Windows NT but has been rewritten in C. It has not undergone exhaustive testing and hence I would welcome any bug-reports you might have. This utility does not write to the registry and should, hence, not cause any damage to it. Microsoft has stated over and over again that modifications to the registry can render the system unusable. Regfind does not modify the registry in any way.

Regfind is a console application: you can run it from a dos box just like the old command line programs. I intend to put a GUI front-end on it sometime but I cannot promise when that will be. Regfind accepts various parameters and they are explained in the section below.

Thanks to this program I have been able to unearth vestiges of obsolete data. After I had changed network names on a few nodes I noticed that my machine was extremely slow when certain programs were started. I searched for old machine names, deleted them from the registry and speed was restored. Those applications were waiting for the old hosts to respond and only after a timeout error was reported did they continue. Thus removing those names from the registry caused the application to start faster.

2. Usage

The command line syntax for executing regfind is: Regfind {<control argument>} [pattern] Regfind may be followed by zero or more control arguments which, in turn, may be followed by a pattern to be searched for. Omitting pattern and control arguments will result in all data in the registry to be shown. This can be quite large and you can restrict it by turning on various filter by means of control arguments. Control arguments start with a "-" or a "/" character; in this document we will use "-".

The generated output is displayed in the form:

Full\key\path\separated\by\slashes value1 = data1 value2 = data2 ... may one of the following: Pattern is a text string which specifies the data to be searched for in the registry. For example, typing "regfind blue" will show you all keys, value/data pairs which have the string "blue" in the key, value or data. This is the same as typing "regfind -any blue". My favorite is "regfind raju" which shows me where the operating system has squirrelled away my name. "Regfind -case raju" will perform a case- sensitive search. Try it out with your name.

To specify a parameter with embedded blanks, enclose it in double-quotes. For example "regfind -key "Control Panel" will display the control panel subtree in all 4 hives.

The -key, -value, -data and -hive control arguments may be used to restrict the amount of information displayed. They are like filters; specifying more than one will cause the filters to restrict the displayed information even more. Thus, "regfind -key xxx" will show all keys, values and data which are under a key which has xxx in it. "regfind -key xxx -value yyy" will only show those keys values and data which have xxx in the keys and yyy in the value names. Similarly, "regfind -key xxx -value yyy -data zzz" will only show those which have xxx in the keys, yyy in the values and zzz in the data. The search can be restricted even more by turning on the -hive control argument. Currently, there are only 4 hives predefined in the Win32 registry (refer to the win32 documentation for details). The -any control argument cannot be used with -key, -value or -data.

Case-sensitivity can be turned on with the -case control argument. This affects the items specified by the -key, -value, -data, -any and -hive. The value/data line is shortened so that it fits into a normal window with 80 columns.

3. Examples

Typing "regfind" on its own will display the whole registry: everything under all the four hives. Typing "regfind blue" (which is incidentally the same as typing "regfind -any blue") will show you If you are looking for a certain string in the key, value or data you could use the appropriate control argument. To see all subtrees of the control panel type "regfind -key panel". This will not show value/data pairs where the word control is in the data or value name.

To turn on case-sensitivity use -case. I prefer the default case-blind searches. To hide value-data pairs use the -hidevalues control argument.

To see everything under the HKEY_LOCAL_USER hive, type "regfind -hive local_user". For just the keys under the same hive type "regfind -hive local_us -hidevalues".

4. Contacting the author

I would welcome any constructive criticism regarding the program, its usefulness to you and any assorted ideas you have which might improve it. However, I cannot guarantee a response and, further, I cannot guarantee that I will fix bugs and/or incorporate your ideas into a future version.

5. Future enhancement

This version is admitedly quite spartan. It is satisfactory for simple searches. However, I intend to expand it.

A parameter for maximum depth will be added so that the search can be restricted to a certain depth. A Windows GUI will be added at some point. The patterns are simple text strings; I intend to implement full regular expressions in future.

6. Legalese

Regfind is supplied "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of mechantability and fitness for a particular purpose. The entire risk as to the quality and performance of the program is with you. Should the program prove defective, you assume the cost of all necessary servicing, repair or correction.

Copyright (c) 1994 Raju Varghese, Intellisoft Inc., Switzerland All Rights Reserved