Add "Defragment" to the Right-Click Menu for Drives - Windows 7/Vista 
In this tutorial, I show you how to add a convenient right-click defragment option in the context menu for drives. You can either download the two registry files below or edit the registry manually to apply this change. When you click on "Defragment," a command-line version of Disk Defragmenter will run and then close automatically when finished.
Automatic Method:
Download this zip file and extract the two files. The first registry file will add the neccesary entries. The second will remove them. Run the file to merge it with your registry.
Manual Method:
Begin by opening the Start Menu and type regedit into the Search or Run box. Press the Enter key.
Once the Registry Editor is running, navigate to HKEY_CLASSES_ROOT\Drive\shell.
Right-click on shell, go to New --> Key, and click on it. Type runas beside the small folder icon and press Enter to name it.
Now right-click on (Default) in the right pane and click on Modify. Under Value data:, type Defragment and click OK.
Next, right-click on runas in the left pane, go to New --> Key, and click on it. Type command beside the small folder icon and press Enter to name it.
Finally, right-click on (Default) in the right side pane and click on Modify. Under Value data:, type defrag %1 -v and click OK. Close the Registry Editor.
Automatic Method:
Download this zip file and extract the two files. The first registry file will add the neccesary entries. The second will remove them. Run the file to merge it with your registry.
Manual Method:
Begin by opening the Start Menu and type regedit into the Search or Run box. Press the Enter key.
Once the Registry Editor is running, navigate to HKEY_CLASSES_ROOT\Drive\shell.
Right-click on shell, go to New --> Key, and click on it. Type runas beside the small folder icon and press Enter to name it.
Now right-click on (Default) in the right pane and click on Modify. Under Value data:, type Defragment and click OK.
Next, right-click on runas in the left pane, go to New --> Key, and click on it. Type command beside the small folder icon and press Enter to name it.
Finally, right-click on (Default) in the right side pane and click on Modify. Under Value data:, type defrag %1 -v and click OK. Close the Registry Editor.
