Add Defragment Now to the right-click menu - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Microsoft Windows and Software > Tips, Tricks & Tutorials
Click Here to Login
Closed Thread
Thread Tools Display Modes
Old 11-23-2006, 10:38 PM   #1 (permalink)
Techie Beyond Description
Osiris's Avatar
Join Date: Jan 2005
Location: Kentucky
Posts: 36,817
Send a message via ICQ to Osiris Send a message via AIM to Osiris Send a message via MSN to Osiris Send a message via Yahoo to Osiris
Default Add Defragment Now to the right-click menu

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.
Osiris is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 03:06 PM.

Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2019, vBulletin Solutions, Inc.