Add Defragment to the Shell menu in Windows 7 / Vista
I find adding common tasks to the shell menu a great timesaver when I am running between stations. It is also easier to direct users to simply “right-click” on something rather than walk them through a maze of menus…or even have them find the “run” box.
- Click Start -> type “regedit” in the Search command box.
- Navigate to HKEY_CLASSES_ROOT\Drive\shell.
- Right-click on “shell” and select New -> Key. Name it “runas” and set the default value to “Defragment”.
- Right-click on “runas” and select New -> Key. Name it “command” and set the default value to “defrag %1 -v“.
- If you ever wish to remove this functionality, just delete the “runas” key.
You can also paste the following into Notepad and save it as: RightClickDefragment.reg or you can download the zippedĀ RightClickDefragment.reg here. Double-click on the .reg file and click “yes” when asked to enter it into the registry.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Drive\shell\runas]
@=”Defragment”
[HKEY_CLASSES_ROOT\Drive\shell\runas\command]
@=”defrag %1 -v”
