By now, you know the importance of defragging your hard drive on a regular basis. As your hard drive gets used over time, you add and remove programs and files, install applications and uninstall them, and generally take up space on the hard drive. Removing things opens up space, but when you put a new thing onto the hard drive in its place, you often end up with not enough room all in a row for all of the information. So your computer will instead place bits and parts of information in several places on the hard drive – this results in your drive being fragmented

. The more fragmented the drive, the slower your computer system will eventually become. The reason for that is that your computer needs all of those pieces of information to open a program or file when you ask for it, and if the bits and pieces of information it needs are scattered around the drive, it takes your system a lot longer to hunt around to get all of them and eventually open the program or file. So we use the Disk Defragmenter utility to correct this problem as much as we can – running the utility lets the system find bits of information and move them around to be closer to other bits of information, freeing up larger spots of open space for you.

All computer users want to be more efficient, and running Disk Defragmenter will make your system more efficient. But you can also make yourself more efficient and get to the Defrag option faster by simply adding the option for it directly to a drive's Context Menu. The Context Menu is the little menu that appears when you right click on something, whether it is a file, program, or, in this case, a hard drive on your computer.

 

To add a new entry to a Context Menu, you need to edit the registry. The process for this is rather simple, all things considered, but you should be aware that it is not without risks before you try it. Editing your registry incorrectly can seriously damage your system, rendering it unstable or completely unusable, so you should NOT edit your registry or attempt to edit your registry unless you are comfortable with the process and are sure you can do it correctly.

 

With that in mind, here is how to do it:

 

1.)  Go to the Start button and click on Run

2.)  Type in regedit.exe to open up the Registry Editor

3.)  When Registry Editor is open, browse down and find the following key: HKEY_CLASSES_ROOT\Drive\shell

4.)  Create a new key under shell and call it “runas” without the quotation marks.

5.)  Now set the (Default) value for that to be “Defragment” (again without the quotation marks).

6.)  Next, create another new key, this time called “command” (without the quotation marks)

7.)  Set the value for “command” to be the following: defrag %1 -v

 

This will add the option for Defragmenter to your Context Menu when you right click on a drive on your system. When you select it from that menu, it will bring up the command line version of the Windows Disk Defragmenter and you can defrag your drive from there!

 

Remember – your system registry is very sensitive and a corruption or improperly edited entry can render your system unstable or completely dead. Make sure you are comfortable with editing your registry before you attempt to make this change on your computer system.