Defragmenting your hard drives and partitions is an important task in making sure your hard drive is clutter free and and in order. It is usually recommended to defragment your drives at least once a month in order to ensure optimized smooth performance. (Note: Defragging is for traditional HDDs, not SSDs.)
Well, if you happen to be one of those who doesn’t regularly defragment their drives, here’s a cool registry hack which makes it a bit more convenient to defrag by adding a “Defragment” shortcut to the right-click context menu for the drives on your computer. The shortcut allows you to easily call Windows’ built-in defrag tool, which hopefully will encourage you to defrag more often than you do already.
How To Add Defragment Shortcut To Right-Click Context Menu On Windows
This should work on Windows XP, Vista, 7, and 8 (32-bit and 64-bit) but I’ve only tested it on Windows 7.
That said, to add defragment shortcut to right-click context menu on Windows, do the following:
- Download this file – AddDefragToDriveMenu.zip 
- Extract the zip file to your desktop. You should get a folder with three .reg files in it
- Double Click the AddDefragToDriveMenu.reg file to add the requisite registry entry for the shortcut to be enabled in the right-click menu. If you want the shortcut to appear in the extended context menu (Shift + Right-Click), then double-click the AddDefragToExtendedDriveMenu.reg key
- Click Yes to the ensuing prompt
- You should now see a confirmation dialog telling you that the requisite entry has been added to the registry.
- Right click (or Shift + Right Click if you have added the shortcut to the extended menu) the drive you wish to defrag, and you should now see a Defragment shortcut in the context menu.
If you ever want to remove this shortcut in the future, simple double click the RemoveDefragFromDriveMenu.reg file from the folder you extracted in Step 2 and that should be it.
That is it. Enjoy!