Add Defragment Now to the right-click menu

Status
Not open for further replies.

Osiris

Golden Master
Messages
36,817
Location
Kentucky
Defragmenting the hard drives of your computer is important especially for users who install lots of programs or perform lots of read and write operations on their hard drives (p2p users for instance). In a perfect world files would be written contiguously on the hard drive - in the world of windows they are not. Read operations waste more time because all the bits that make the file are not in one place but scattered around the complete hard drive. Defragmenting the drive moves them closer to each other to speed up loading times.

IÂ’m lazy. I do not want to right-click the drive, select Properties, change to the Tools tab and click on Defragment Now. Fortunately for users like me there is a workaround that adds the option to defragment your hard drive to the right-click menu when you perform that operation on a drive. We only need to add one new key to the registry and the option appears whenever we right-click a drive from then on.


Open your registry by hitting the windows key and R. The run dialog appears, enter regedit and hit enter. Navigate to the key HKEY_CLASSES_ROOT\Drive\shell. If the shell key is missing create it by right-clicking on Drive and selecting NEW, KEY and enter the name shell. Create a subkey the same way naming it defragnow. Double-click the default value on the left side and add a name for the command that will appear in the right-click menu, defrag for instance.

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.


http://www.ghacks.net/2006/11/02/add-defragment-now-to-the-right-click-menu/#more-888
 
Status
Not open for further replies.
Back
Top Bottom