Everyone familiar with Windows believes that almost everything can be done through the registry. The real problem is how to quickly find the correct registration key.
In most cases, operating the registry means finding a specific sub-key. Occasionally, you may need to modify the name of the key at once (for example, you may need to change the structure ). Then, how can we quickly find the correct sub-key and execute the modification? What should you do if you not only need to modify the registry of the local machine, but also make the same changes to the remote machine? This article tells you a good tool, regfind. Regfind can be found from resource kit supplement one of Windows 2000 Server or downloaded from the Internet. Regfind is applicable to various versions of Windows, including Windows 9x series.
Regfind is a command line tool. Execute regfind without any options. It displays help information. The simplest usage is to execute a search. For example, if you execute regfind "QQ", regfind will find all the registration keys containing the string "QQ", as shown in 1.
Figure 1
In addition to searching, regfind can also execute replacement: simply add the-r option and a replacement string after the command in Figure 1. For example, if your company name is changed from agroup to Bgroup, you only need to execute: regfind "Agroup"-R "Bgroup ". Note: If the search string contains spaces or punctuation characters, the string should be enclosed by quotation marks.
To modify a remote machine, add the-M option after the preceding command and specify the UNC (Universal Naming Convention) path of the remote machine. For example: regfind-m \ server03 "Agroup"-R "Bgroup ".
Searching the entire registry is undoubtedly a very time-consuming task. To improve efficiency, You can restrict the regfind search operation to the branch or subkey of a registry. You only need to specify the Registry location to be searched after the-P option. For example, if you want to restrict the search "Agroup" operation to the HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft sub-key, replace the agroup under the sub-key with the Bgroup, and execute: regfind "Agroup"-R "Bgroup"-P "hkey_local_machinesoftware \ Microsoft ".
It can be seen from the above description that regfind is a very convenient tool, but sometimes you still feel that it cannot meet the requirements. First, regfind does not support wildcards or regular expressions, which are very useful for complex searches. The only option that adds flexibility to search operations is-y. The-Y option makes the regfind search operation case insensitive, that is, if you execute regfind agroup-y, the regfind search results will contain a combination of agroup, agroup, and other uppercase and lowercase letters (if the-Y option is not available, regfind is case sensitive by default, but regfind Command Options are case insensitive, for example, you can use-R or-R at will ).
Second, if you use regfind to perform the search/replace operation, it will replace all the found strings. You cannot require regfind to replace only one of them. The remedy is to restrict the search operation to a specific registry branch. Therefore, my suggestion is: first use regfind to find all matched registration subkeys, and then use regfind to perform global replacement or manually modify a specific subkey.
Third, if you want to modify numeric data, regfind does not seem to be the best helper. This is because, many REG_DWORD values to be processed are not 0 or 1, and the chances of occurrence of 0 and 1 in the Registry are too frequent, and it is likely to be replaced by mistake. The only way to solve the problem is to limit the regfind search range as accurately as possible.