Techist - Tech Forum

Techist - Tech Forum (
-   Tips, Tricks & Tutorials (
-   -   Add Defragment Now to the right-click menu (

Osiris 11-23-2006 11:38 PM

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.

All times are GMT -5. The time now is 12:48 AM.

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