≡ Menu

FormatDatabase registry key

We can delete existing Offline files(CSC) cache by modifying FormatDatabase registry value and rebooting the machine. Steps are given below.

Windows XP/Server 2003

  • create a registry value ‘FormatDatabase‘ of type REG_DWORD under the node HKLMSoftwareMicrosoftWindowsCurrentVersionNetCache.
  • Set its value to 1.
  • Reboot the machine

From command line, you can set FormatDatabase to 1 by running the below command.

REG ADD HKLMSoftwareMicrosoftWindowsCurrentVersionNetCache /v FormatDatabase /t REG_DWORD /d 1 /f

Note that FormatDatabase registry value is under HKLM node hence modifying it requires administrator privileges.

Vista / Windows 7

  • create a registry value ‘FormatDatabase‘ of type REG_DWORD(32 bit) under the node HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesCscParameters .
  • Set its value to 1.
  • Reboot the machine

The above registry change can be done from command line by running the below command.

REG ADD HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesCscParameters /v FormatDatabase /t REG_DWORD /d 1 /f

In Windows 7 or Vista the above command should be run from an elevated administrator command prompt.

Note that cache will not be deleted with every reboot of the machine as the FormatDatabase value will be deleted from the registry after the first reboot.

This method deletes everything form the cache and when the system is up and user logs in, if there are any files or folders marked for offline availability, these will be synchronized and cache will be initialized. For example, if My Documents is redirected to a network share, even after setting FormatDatabase to 1 and rebooting the machine you will still see that cache is filled up with the files from My Documents folder.

{ 0 comments… add one }

Leave a Comment