Windows 7: Add Defragment Option to Right-click Menu

Defragmenting the hard disk is an essential operation. However, many people do not like to schedule defragmentation to be performed automatically. By adding the defragment option to a drive’s right-click context menu, you can manually defragment quickly and easily.

Open the Run dialog by pressing the Windows key and “R” or start a new task from the Task Manager.

Start the Registry Editor by typing “regedit” into the run dialog and press enter.

Go to HKEY_CLASSES_ROOT  >>  Drive >> shell in the left pane.

d

Right-click on shell and create a new key called “runas”.

Set the default value of runas in the right pane to “Defragment” by double-clicking on it.

Right-click on runas and create a new key called “command”.

Set the default value of command in the right pane to “defrag %1 –v -u” by double-clicking on it.

Restart the computer.

The right-click menu of the drives now will display the defragment option. When selected, it will start the defragmentation of that drive.

The Conversation

Follow the reactions below and share your own thoughts.

One Response to “Windows 7: Add Defragment Option to Right-click Menu”

  1. October 27, 2010 at 8:00 am, sunpie said:

    I too dont find scheduling very reliable. Also in Windows 7 there is no true automatic feature like a commercial automatic defrag would offer, something like a ‘set it to run in background and never have to bother about defrag again.’

    Reply

Leave a Reply

You may also like-

The Tech-Recipes Quick Guide to Customizing Windows 7Microsoft's latest operating system is a bit different than Windows versions of the past, and with these differences come more things to customize and ...