Add Defragment to your right click context menu

Sometimes, you want quick access to defragment your hard drives. Well, you can save yourself a few clicks by adding the Defragment command to your right click context menu. This can come in handy (although it does nothing to speed up the defrag process itself).

1. Go to Start, type in regedit and press enter (Or you can go to Start, Accessories, Run and type regedit).

2. Navigate to the key HKEY_CLASSES_ROOTDriveshell.

3. Name it defrag (this name can be anything, really).

4. On the right pane, double click the Default value and name the Value Data field with “Defragment“. This text is going to be what you see when you right click a drive, so it is also custom.

5. Right click on the defrag key that you made earlier and choose New and Key.

6. Name it command.

7. Double click the Default value of this key, and change the Value Data with defrag %1 -v.

8. Now, when you right click a drive, you will have the Defragment command available. It does open a Command prompt to do it’s work.

  • tuna76

    Is there anyway to get the same graphics as in the XP defragmenter on vista? Sometimes it seems to have run but the fragmentation levels seem the same and I cant make out whats happenign! I am seriously considering getting one of the third party defragmenters which will run automatically and has a GUI.

  • admin

    As far as I know, there is no way to get the XP defrag GUI working with Windows 7. There are some free third party programs available, however. Defraggler (from the makers of CCleaner), SmartDefrag. There are also some excellent paid-for software choices, but they offer little more than what the freeware does. Although they can defrag system files, as well as move files (automatically chosen by how active, or by manually choosing) to the center of the drive to make access faster. There are more to the list, but these are ones that I’ve used with no issues. I was able to get a free copy of O&O Defrag through a promotion (it was a previous version).

    Free:
    Defraggler: http://www.piriform.com/defraggler
    SmartDefrag: http://www.iobit.com/iobitsmartdefrag.html

    Paid:
    O&O Defrag: http://www.oo-software.com/home/en/products/oodefrag/