Get Updates Directly In Your Inbox

Friday, March 25, 2011

Windows 7 Tips

Add Defragment to the Right-Click Menu for a Drive



Normally when you want to access the Defragmenter tool, you usually have to either find it through the start menu, or open up the drive properties window. Instead of going through all that, we can use a simple registry hack to add a menu item to the drive right-click menu.


Manual Registry Hack

Open up regedit.exe through the start menu search or run box, and then browse down to the following key:

HKEY_CLASSES_ROOT\Drive\shell


Create a new key under shell called “runas”, and then set the (Default) value to “Defragment”. If you want to hide this menu item behind the Shift key right-click menu, then add a new string called Extended with no value.


Next, you’ll need to create a key called “command” and set the default value to the following, which is the command to run defrag with the default options but show verbose output.

defrag %1 -v

After manually applying you’ll have a new item on the right-click menu for your drives.


Which will start up the command-line version of Disk Defragmenter (after accepting the UAC prompt)


Related Posts Plugin for WordPress, Blogger...

Search This Blog

Followers

Twitter Delicious Facebook Digg Stumbleupon Favorites More