How to Speed Up Windows Disk Cleanup
By on February 16th, 2010

disk-cleanup-icon Cleaning out the junk files on your PC is something you should do on a regular basis. Microsoft has included a file cleaning utility in Windows, and it’s called Disk Cleanup. Running Disk Cleanup will often make your system a little snappier and you can also free up a large amount of used disk space.

You can find the Disk Cleanup utility in the following locations:

WinXP: Start > Program Files > Accessories > System Tools > Disk Cleanup

Vista/Win7: Start > All Programs > Accessories > System Tools > Disk Cleanup

disk-cleanup

If you occasionally clean out your unwanted system files using Windows “Disk Cleanup”, you may have seen that the Disk Cleanup utility takes a long time scanning for “Compressed Folders”. I have seen this many times and it makes me impatient every time.

A few weeks ago, a friend of mine at work (Bill M), told me that there’s a registry hack to make Cleanup skip the long wait. He was right, I found it using a simple Google search.

Here’s the registry hack (works in XP, so far – have not seen this work in Vista and Win7):

WinXP: Open up the registry editor by clicking the Start Button, then choose Run, type in “regedit” and press the OK button.

Vista/Win7: Hit the Start button and type regeditin the quick search.

Once you have regedit running, find the following location:
“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
\CurrentVersion\Explorer
\VolumeCaches\System error memory dump files”

The “Flags” value must be set to “0″.

For 64-bit Windows only:

“HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows
\CurrentVersion\Explorer
\VolumeCaches\System error memory dump files”

The “Flags” value must be set to “0″.

You may not   notice any difference until you reboot, but the next time you use Disk Cleanup, you should notice a substantial decrease in the amount of time it takes.

Tags: , , , , , , ,
Author: Clif Sipe Google Profile for Clif Sipe
Promoting Freeware and Free information since 2004. Owner of FreewareWiki.com with over 2000 pages of freebies. Please subscribe to my Google Feed or follow me on Twitter @clifnotes.

Clif Sipe has written and can be contacted at clif@techie-buzz.com.
  • RichH

    This worked fine for XP, but "Compress old files" does not appear in my 32 bit Windows 7 registry or in my 64 bit Windows 7 registry.

    • http://clif-notes.blogspot.com Clif Sipe

      Thanks Rich – I noticed the same thing. I think that there may be more to do yet to speed up the Disk Cleanup even further for Win7 and Vista. In my Win7 – it takes a long time scanning "System error memory dump files". Do you see the same thing when you run it?

      • RichH

        Yes, and I don't get the "Clean up system files" option until it's finished scanning. Then it does a second scan before giving me the "More Options" tab. I always get rid of all but the most recent restore point. If the most recent doesn't fix it, none of the others will either. (At least never for me.)

    • greentech07

      u can use reginout cleaner to speed up and do deep system clean in quick time

  • Walter Earnshaw

    I followed your instucts leading in regedit to " not " finding 'compress old files'. Then I noticed a letter from RichH which you answered by >> 'System error memory dump files'. You then said it took a long time to scan this. So, my question is how do I scan this aforementioned system error memory dump files as I don't seem to have the necessary scanner?

    Walter Earnshaw

    • http://clif-notes.blogspot.com Clif Sipe

      Hi Walter – Rich and I discovered that the speed-up registry hack does not work in Vista and Win7 because that registry key "compress old files" is missing. We both noticed that Windows Cleanup in Win7 takes a long time when it first starts. It gets stuck and gives the message "scanning System error memory dump files" – so far, I have not found a fix for this and there is no way to speed up Windows Cleanup in Win7.

      • Ron

        This is true also for Vista. Exactly the same as Win 7. Hope somebody figures this out. Sometimes it runs for 10 minutes or more!

      • Ron Sheek

        IMPORTANT UPDATE!!

        Success for Vista! I looked further in the same section of the Registry and saw a key sub-section for "System error memory dump files" and looked at the values there and saw the value named "Flags" with the data of "7d" (hex). I set the value data to "0" and voilà! Running Disk Cleanup now skips scanning for system error memory dump files, and I didn't even have to reboot! I have yet to see whether or not this fix survives a reboot. Not being sure if this might have a side effect, I created a new DWORD value named "Flags (original value)" and put the data "7d" there in case I want to restore it.

        To recap: Go to the Registry key "HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionexplorerVolumeCachesSystem error memory dump files" and find the value "Flags" in the right panel and change its data to "0" (you might want to save the original value somewhere). The fix is immediate, no reboot required.

        If anyone finds any side effects to this, please let us know. I don't have Win 7, but I expect it will work there, too.

      • Ron Sheek

        I see that the full Registry key path in my last post is too long and got cut off. Here it is again broken into pieces:

        "HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows

        CurrentVersionexplorer

        VolumeCachesSystem error memory dump files"

        • http://clif-notes.blogspot.com Clif Sipe

          Thanks for the hard work Ron – I tried it and unfortunately, it did not work for me. I'm using the RC version of Win7 build 7100. I'm in 2 hour reboot mode now. :(

          • Ron Sheek

            Hmm, well, that's a puzzle. I have Win7 x64 RC1 7100 also, but only on a VMWare virtual machine (yeah, bummer about expired RC's). So anyway, I just now booted up the Win7 virtual machine and tried my fix, and it worked for me there as well, exactly the same way.

            So now I'm wondering if we're talking about the same problem. The long delay problem I've been seeing is when I go to the "General" tab in my system (C:) drive's properties dialog and click on the "Disk Cleanup" button next to the disk usage pie chart graphic. An initial small dialog pops up saying "Disk Cleanup is calculating how much space you will be able to free on (C:). This may take a few minutes to complete." The image of the dialog you have on your web page is the same one. A line of text below the progress bar tells you what it is currently scanning, and it runs through several things until it gets stuck on "Scanning: System error memory dump files" and you wait and wait and wait! Once it finally finishes, the small dialog disappears and the main Disk Cleanup dialog appears and you can finally do your thing. After my registry fix, the small dialog never gets stuck on scanning for system error memory dump files on either of the Vista x64 Ultimate and Win7 x64 Ultimate RC1 systems I've tried.

            Is this the same problem? If it is, then I'm at a loss as to what the difference is between our systems.

          • Ron Sheek

            Well, I should do more research before I post here and avoid unnecessary posts. I believe I have it figured out. There IS a difference…and the difference is how you get to the Disk Cleanup tool (if you can believe that!), and two different locations in the Registry if you’re running 64-bit Windows.

            As is often the case with Windows system tools, there is more than one way to get to the Disk Cleanup utility. There is the way you mention in your article above by going through the path: Start > All Programs > Accessories > System Tools > Disk Cleanup. And there is also the path I normally use which is to use Windows Explorer (or My Computer, or a File Open dialog, or anything that presents you with the Windows folder tree) and right-click on the system drive icon C: (or whatever letter it is) and select properties, and then click on the Disk Cleanup button in the properties dialog. There may be other paths as well.

            When I use the Start button path you mentioned to get to Disk Cleanup, I still get the long delay of scanning for system error memory dump files, even with my registry fix in place, just as you reported. But when I go by way of the system drive’s properties dialog as I normally do, no delay!

            I wondered if the Start button path might look at a different part of the Registry with a similar set of keys and values and did more looking, and found it. With 64-bit Windows, Microsoft duplicated much of the Registry in two places, HKEY_LOCAL_MACHINE\SOFTWARE\ (for 64-bit apps), and HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ (for 32-bit apps). Inconsistent use of these areas (and others) by old and new apps alike has led to a real mess in keeping things in the 64-bit Windows Registry straight and even Windows’ own use of the Registry gets confusing. Accessing Disk Cleanup from the icon in System Tools uses the 32-bit location and accessing from the drive properties dialog uses the 64-bit location. Of course, if you’re running 32-bit Windows, there is only one location to deal with.

            So the fix I gave above has to be applied to two locations in 64-bit Windows:

            For 32-bit and 64-bit Windows:

            “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
            \CurrentVersion\Explorer
            \VolumeCaches\System error memory dump files”

            For 64-bit Windows only:

            “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows
            \CurrentVersion\Explorer
            \VolumeCaches\System error memory dump files”

            In both places the “Flags” value must be set to “0″. As far as I can tell, the fix is the same for Vista and Win7. I can’t actually test this fix on 32-bit Windows so maybe someone who reads this can do it for us.

            Let me know if this works for you.

          • http://clif-notes.blogspot.com Clif Sipe

            32 bit Win7 is good to go. Good work Ron. I think this is the solution.

            I had initially chosen "Memory Dump Files" instead of "System error memory dump files". Once I corrected that, it works fast and does not get stuck scanning for minutes.

            Do I have you're permission to post this in a new article? Do you have a blog or website you want linked to your name, if I do publish?

          • Ron Sheek

            We appear to have reached a reply nesting level limit here so the web page would not let me reply directly to your post, Clif.

            By all means, do publish! No ceremony here. I no longer have a web site or blog, so just mention my name as a contributer or something. Please email me at ‘ron@sheek.com’ when you’ve posted the new article.

            A few final notes on the fix:

            The “Flags” value had an initial data value of “7d” on my systems. Was yours different? This value is most likely a bit field with the bit string of “01111101″ and it may be that only one of those 1′s has to be set to a 0 to turn off the checking for system error memory dump files and the other 1′s may mean something else. And our being more selective, by turning off only the bit that needs to be, might avoid potential side effects that we have yet to see. But then, figuring out which bit(s) and trying to explain all this to users is a bit much, so I suppose just setting the whole value to “0″ is the best way to go.

            In looking at all the keys under “\VolumeCaches”, it appears that what we’re doing to the “System error memory dump files” key may be done to some of the other keys as well, at least the ones that already have a “Flags” value with non-zero data. If anyone has reported a long delay while scanning these other areas, like “Old ChkDsk Files” or “Windows Error Reporting Queue Files”, then it’s probably possible to disable the checks on these also.

            I enjoyed the collaboration, Clif. It always feels good to squeeze a little more cooperation out of Windows. Good luck with the article.

 
Copyright 2006-2012 Techie Buzz. All Rights Reserved. Our content may not be reproduced on other websites. Content Delivery by MaxCDN