• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 258
  • Last Modified:

How can i defrag the registry ???????????

Hi All

i want to take a backup of registry, but not with command because  i also want to defrag the registry , but when we considered the registry files they can't allow any manipulation on them , means you can't access them nor delete , nor cut ,copy etc so how can i defrag or take the backup of these registry files.

how can i  implement programmaticaly in MFC , i dont want the tool to defrag the registry , i just want the idea how i will
take the backup & defragmentation of these registry files.

if iam not wrong The following Registry files are stored in %SystemRoot%\System32\Config\:

    * Sam
    * Security
    * Software
    * System
    * Default
    * Userdiff
    * NTUSER.dat

Thanks & Regards
2 Solutions
yes you are right, the registry files are stored in that directory.

if you have system restore enabled, you can also access backed up versions of these files in the system volume imformation folder, ie:

C:\System Volume Information\_restore{D86480E3-73EF-47BC-A0EB-A81BE6EE3ED8}\RP1\Snapshot

to gain access to the system volume information folder, you will need to start the computer in safe mode (F8 on boot) and give yourself access to the folder (right-click, properties, security).

once you have access to the system volume information folder, create a restore point, then copy the registry backups from there.

this would be the easiest (in my opinion) way of going about it.

as for defragging the registry, I think Norton Utilities has an option for this, in fact I think Tune-up Utilities also has this feature.

let me know how you go.
This program here:


will let you defragment locked files after a reboot.

As for programattically doing it, I'm not sure.  Perhaps you can get a registry key enumerator (my memory is a bit hazy on this), and then go through the entire registry, copying it.

If you want to access the files directly on disk, you'll need to either have your process request permission to access them, or do it on a reboot before windows is completely started, as PageDefrag does above.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now