9.11. Setting the Maximum Registry Size


This recipe applies only to Windows 2000. On a Windows Server 2003 system, the maximum registry size is constrained only by the amount of physical memory installed.


You want to set the maximum size to which the registry files can grow.


For the change to take effect, you must restart the system after changing the size.

Using a graphical user interface

  1. Open the System applet in the Control Panel.

  2. Click the Advanced Tab.

  3. Click the Performance Options button.

  4. Click the Change button.

  5. Modify the maximum registry size setting at the bottom of the dialog box.

  6. Click OK until all of the windows are closed.

Using a command-line interface

To set the maximum registry size, run the following command:

> reg add \\<ServerName>\HKLM\System\CurrentControlSet\Control /v RegistrySizeLimit 
/t REG_DWORD /d <SizeInBytes>

For example:

> reg add \\fs01\HKLM\System\CurrentControlSet\Control /v RegistrySizeLimit /t 
REG_DWORD /d 104857600

To find the current size of the registry in bytes, run the following command:

> dureg -a


You can find the dureg utility in the Windows 2000 Resource Kit. For some reason it isn't part of the Windows Server 2003 Resource Kit.

Using VBScript

' This code sets the maximum registry size on a Windows 2000 server.
intValue     = <SizeInBytes>   ' e.g., 104857600 (size of the registry in bytes)
strComputer  = "<ServerName>" ' e.g., server01 (use "." for local server) ' ------ END CONFIGURATION --------- ...

Get Windows Server Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.