JSI Tip 2494. Discover how much data is stored in the registry, a subtree, or a key.
June 13, 2000
The Windows 2000 Resource Kit contains Dureg.exe - Registry Size Estimator.
"DuReg is a command-line tool that enables you to discover how much data is stored in the registry, or in any registry subtree, key or subkey. Additionally, the tool also enables you to search for all occurrences of a text string in the registry. This search can be limited to a specific subtree.
DuReg counts data, not space. Because the space any data occupies varies with the storage method and amount of free space available, the size of data and size of space consumed are not equal. Also, because it measures data, DuReg does not account for fragmented free space in the registry.
The DuReg helps developers and administrators estimate how much space registry data is consuming.....
The registry data size function is unique to each system. You can determine the maximum registry size and an estimate of the current registry size by using System in Control Panel. You can also find the current:maximum size ratio (expressed as a percentage) by using the System: % Registry Quota in Use counter in PerfmonSysmon. However, only DuReg returns the size of individual keys and subkeys."
Syntax:
dureg [{/cr | /cu | /u | /lm | /a}] [{/s | /d}] ["registry_path"] ["string to search"]
Where:
/a finds the size of entire registry (all). dureg /a returns: Size of HKEY_CLASSES_ROOT : 6181756 Size of HKEY_USERS : 1565865 Size of HKEY_LOCAL_MACHINE : 12367471 Total Registry data size: 20115092/cr "registry_path" Sizes HKEY_CLASSES_ROOT. Include a registry path to find the size of any key within this subtree. /cu "registry_path" Sizes HKEY_CURRENT_USER. Include a registry path to find the size of any key within this subtree. /lm "registry_path" Sizes HKEY_LOCAL_MACHINE. Include a registry path to find the size of any key within this subtree. For example, dureg /lm "softwaremicrosoft" finds the size of the HKLMSoftwareMicrosoft key. /u "registry_path" Sizes HKEY_USERS. Include a registry path to find the size of any key within this subtree. /s "string" searches for the "string" in the registry. For example, dureg /s "video" finds all occurrences of "video" in the registry. dureg /lm /s "video" finds all occurrences of "video" in HKLM. dureg /s /lm "Content Type" returns: HKEY_CLASSES_ROOTMIMEDatabaseContent Typeapplication/fractalsExtension : .fif HKEY_CLASSES_ROOTMIMEDatabaseContent Typeapplication/htaCLSID : {3050f4d8-98B5-11CF-BB82-00AA00BDCE0B} HKEY_CLASSES_ROOTMIMEDatabaseContent Typeapplication/htaExtension : .hta HKEY_CLASSES_ROOTMIMEDatabaseContent Typeapplication/mac-binhex40Extension : .hqx . . . HKEY_CLASSES_ROOTMIMEDatabaseContent Typevideo/x-msvideoExtension : .avi Note: To stop a search, press CTRL+BREAK.
About the Author
You May Also Like