Microsoft KB Archive/317382

= HOW TO: Use the Registry Size Estimator Tool (Dureg.exe) =

Article ID: 317382

Article Last Modified on 1/18/2007

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition

-



This article was previously published under Q317382





IN THIS TASK
SUMMARY
 * Overview of the Dureg.exe Tool
 * Examples

REFERENCES



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:

http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/dureg-o.asp

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 | / &quot; &quot;

dureg /s / &quot; &quot;

The parameters that you can use with Dureg.exe are:
 * /a: Use this parameter to determine the size of the entire registry.
 * / : Use this parameter to determine the size of the registry subtree, where  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.
 * &quot; &quot;: This parameter specifies the path of the registry key whose size you want to determine. Use it with the  parameter to find the size of a key in a registry subtree.
 * /s &quot; &quot;: Use this parameter to search for a specific string in the registry.
 * /s  &quot; &quot;: Use this parameter to search for a specific string in a registry subtree, where   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:

dureg /a

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:

dureg /u

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 &quot;Software\Microsoft&quot;

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 &quot;Internet Explorer&quot;, type the following command at the command prompt, and then press ENTER:

dureg /s &quot;Internet Explorer&quot;

All registry entries that contain the string &quot;Internet Explorer&quot; are listed.

 To search the HKEY_CLASSES_ROOT subtree for all occurrences of &quot;Content Type&quot;, type the following command at the command prompt, and then press ENTER:

dureg /s /cr &quot;Content Type&quot;

All entries in the HKEY_CLASSES_ROOT subtree that contain the string &quot;Content Type&quot; are listed.</li></ul>

back to the top