How To: Add Disk Defragmenter Shortcut To The Right-Click Context Menu For A Hard Disk Drive

Author: admin
Category: Windows Performance

About Windows Disk Defragmenter  Utility

Disk Fragmentation occurs naturally when you use a hard disk drive frequently, just by doing basic tasks like creating, deleting and modifying files.At some point, the operating system(Windows Vista or Windows XP) needs to store parts of a file in non contiguous clusters.This is entirely invisible to you, but it can slow down the speed at which data is accessed because the hard disk drive must search through different parts of the disk to put together a single file. In a nutshell, the Disk Defragmenter utility in Microsoft Windows operating system will optimize a disk by defragmenting the stored files.The Disk Defragmenter will locate fragments of files stored in different locations on the disk and then copy them into a single continuous file at a point on the disk that has enough free space and then compares the two files and updates the Master File Table (MFT). After writing to the MFT, the Disk Defragmenter will then delete the old fragmented file and the MFT is again updated with the new free space information.

By a simple registry tweak you can add “Defragment” to the context menu on any hard disk drive when you right click it.

  • Open up regedit.exe through the start menu search or run box, and then browse down to the following key:

HKEY_CLASSES_ROOT\Drive\shell

  • Create a new key under shell called “runas”, and then set the (Default) value to “Defragment”.
  • If you want to hide this menu item behind the Shift key right-click menu, then add a new string called Extended with no value.
  • Right-click on defragnow and create a new subkey called command. Double-Click the Default entry on the left side again and enter the following value: defrag.exe %1 -v

Once done close the registry and right-click a drive to see if the new option defrag appears. If it does test it by left-clicking on it, a new window should appear and the defragmentation should automatically start.

Alternate Method:

Download, extract, and double-click on AddDefragToDriveMenu.reg and AddDefragToExtendedDriveMenu.reg to merge the registry values into the Windows registry. You can use the included RemoveDefragToDriveMenu.reg file to rollback the changes.

Disk Defragment As A Context Menu Item

Popularity: 12%

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google

Did You Like This Post? Then You Might Find These Also Interesting:

Leave a Reply