Follow this blog:
RSS
Email Alert

TR Dojo

Video: Add Defragment and Disk Cleanup to Windows right-click menu

Takeaway: Bill Detwiler shows you how to add the Defragment and Disk Cleanup commands to the Windows right-click menu.

September 7, 2010, 6:53 AM PDT | Length:00:03:58

View Transcript

Windows power users often run the operating system’s Defragment and Disk Cleanup utilities as part of their regular system maintenance. And while you can access these tools through various Windows menus and applets, those who use them frequently might want a quicker option. During this week’s episode of TR Dojo, I show you how to add the Defragment and Disk Cleanup commands to the Windows context menu–putting them just a right-click away.

How often do you defragment or perform other hard disk maintenance tasks?

For those who prefer text to video, you can click the Transcript link that appears below the video player window or check out Jack Wallen’s article, “How do I add Defragment and Disk Cleanup to the right-click menu in Windows Explorer?”

You can also sign up to receive the latest TR Dojo lessons through one or more of the following methods:

Get IT Tips, news, and reviews delivered directly to your inbox by subscribing to TechRepublic’s free newsletters.

Bill Detwiler

About Bill Detwiler

Bill Detwiler is Head Technology Editor of TechRepublic. Previously, he worked as a Support Tech and IT Manager in the social research and energy industries.

Bill Detwiler

Bill Detwiler
Bill Detwiler is Head Technology Editor for TechRepublic. Previously he worked as a Technical Support Associate and Information Technology Manager in the social research and energy industries. Bill is a Microsoft Certified Professional with experience in Windows administration, data management, desktop support, and system security.

Bill Detwiler

Bill Detwiler
Bill Detwiler has nothing to disclose. He doesn't hold investments in the technology companies he covers.

Transcript

Bill Detwiler: Windows power users normally run the operating system's Defragment and Disk Cleanup utilities as part of their regular system maintenance. And while you can access these tools through various Windows menus and applets, those who use them frequently might want a quicker option.

 

I'm Bill Detwiler, and during this episode of TR Dojo, I'll show add the Defragment and Disk Cleanup commands to the Windows context menu so that they're both just a right-click away

 

The steps I'll outline during this episode will let you launch both the Defragment and Disk Cleanup utilities by right-clicking a hard drive's icon from within Windows Explorer.

 

As this requires editing the Windows registry, make sure you have a reliable backup before you make any changes. Improperly editing the registry can have seriously consequences.

 

So open the Registry Editor and navigate to HKEY_CLASSES_ROOT\Drive\shell.

 

Create a new key under this section by right-clicking shell and selecting New | Key. Name it runas. Now, right-click the new runas key and select Modify. Set the Default value to Defragment.

 

Now select the runas key, right-click it, and select create a new key. Name this key "command" and give it a default value of defrag %1 -v.

 

And close the registry editor.

 

Now if you open up Windows Explorer and right-click a drive, you will see Defragment as a choice in the menu. Depending on the version of Windows you use, when you click on the Defragment option, you may have to give Windows permission to run the task.

 

Now let's do the same thing for Disk Cleanup. From within the Registry Editor, navigate back to the key HKEY_CLASSES_ROOT\Drive\shell.

 

Create a new key under shell named diskcleanup and give it a default value of Disk Cleanup.

 

Now create a child key by right-clicking on diskcleanup and selecting New | Key. Name it command (as we did with the defrag key) and enter a default value of cleanmgr.exe /d %1.

 

Close the registry editor.

 

Now when you go to My Computer, right-click one of the drives in the list, and you will see the Disk Cleanup menu entry right next to the Defragment entry.

 

For those who want quick access to Windows' defrag and Disk Cleanup tools, these tweaks can be real time savers. And if you'd like to know how to hide your new right-click options and only have them appear when you press a certain key, check out this article from Jack Wallen. I'll link to it from the TR Dojo blog.

 

And as always, for more teachings on your path to becoming an IT Ninja, visit trdojo.techrepublic.com, or you can follow me on Twitter at twitter.com/billdetwiler.

 

Thanks for visiting the TR Dojo.

15
Comments

Join the conversation!

Follow via:
RSS
Email Alert