SUMMARY
This step-by-step article describes how to use the Registry
Size Estimator tool (Dureg.exe) to determine the size of the registry on a
Microsoft Windows 2000-based computer. Dureg.exe is included in the Microsoft
Windows 2000 Resource Kit, and is also available for download from the
following Microsoft Web site:
Dureg.exe is a command-line utility that you can use to determine
how much data is stored in the registry, or in any registry subtree, key, or
subkey. You can also use this tool to search the registry or any registry
subtree for occurrences of a specific text string.
Dureg.exe
measures data; it does not measure space. Note that because the space that data
occupies varies with the storage method and the amount of free disk space that
is available, the size of data and the amount of disk space that is used are
not equal. Additionally, because Dureg.exe measures data, it does not account
for fragmented-unused space in the registry.
back to the top
Overview of the Dureg.exe Tool
Dureg.exe uses the following syntax:
dureg /a | /subtree switch "registry_path"
dureg /s /subtree switch "string"
The parameters that you can use with Dureg.exe are:
- /a: Use this parameter to determine the size of the entire registry.
- /subtree switch: Use this parameter to determine the size of the registry
subtree, where subtree switch is one of the
following:
- cr: This parameter returns the size of the HKEY_CLASSES_ROOT
subtree.
- cu: This parameter returns the size of the HKEY_CURRENT_USER
subtree.
- lm: This parameter returns the size of the HKEY_LOCAL_MACHINE
subtree.
- u: This parameter returns the size of the HKEY_USERS subtree.
- "registry_path": This parameter specifies the path of the registry key whose size
you want to determine. Use it with the subtree
switch parameter to find the size of a key in a registry
subtree.
- /s "string": Use this parameter to search for a specific string in the
registry.
- /s subtree switch "string": Use this parameter to search for a specific string in a registry
subtree, where subtree switch is one of the
following:
- cr: This parameter searches the HKEY_CLASSES_ROOT
subtree.
- cu: This parameter searches the HKEY_CURRENT_USER subtree.
- lm: This parameter searches the HKEY_LOCAL_MACHINE subtree.
- u: This parameter searches the HKEY_USERS subtree.
back to the top
Examples
- To determine the size of the registry, type the following
command at the command prompt, and then press ENTER: A list that is similar to the following list is displayed:
Size of HKEY_CLASSES_ROOT : 7038858
Size of HKEY_USERS : 368850
Size of HKEY_LOCAL_MACHINE : 16865967
Total Registry data size: 24273675
- To determine the size of the HKEY_USERS
subtree, type the following command at the command prompt, and then press
ENTER: A message similar to the following is displayed in the Command
Prompt window:
Size of HKEY_USERS : 368850
- To determine the size of the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft registry key, type the
following command at the command prompt, and then press ENTER:
dureg /lm "Software\Microsoft"
A message that is similar to the following message is displayed:
Size of HKEY_LOCAL_MACHINE\Software\Microsoft : 4580238
- To search the registry for all occurrences of "Internet
Explorer", type the following command at the command prompt, and then press
ENTER:
dureg /s "Internet Explorer"
All registry entries that contain the string "Internet Explorer"
are listed.
- To search the HKEY_CLASSES_ROOT subtree for all occurrences
of "Content Type", type the following command at the command prompt, and then
press ENTER:
dureg /s /cr "Content Type"
All entries in the HKEY_CLASSES_ROOT subtree that contain the
string "Content Type" are listed.
back to the top
REFERENCES
For additional information about Windows 2000 Resource Kit
tools that are available for download, click the article number below to view
the article in the Microsoft Knowledge Base:
274305 Free Windows 2000 Resource Kit Tools for Administrative Tasks
For more information about the Windows 2000
Resource Kit, visit the following Microsoft Web site:
back to the top