Disk Cleanup wont work!

Discussion in 'Software' started by GStam66, Jul 3, 2005.

  1. GStam66

    GStam66 Private First Class

    Every time i run disk cleanup, it stops working after 3 or 4 green bars appear in the progress bar/percent bar.

    Any ideas on whats wrong and how to fix it? Or how do delete those files, normally deleted through Cleanup, manually?
     
  2. NICK ADSL UK

    NICK ADSL UK MajorGeeks Forum Administrator Staff Member

    Hi there :)
    This is the work around for your problem
    Do follow it word for word

    WORKAROUND
    Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

    To work around this problem, follow these steps:
    1. Click Start, and then click Run.
    2. Type regedit in the Open box, and then press ENTER.
    3. Locate, and then click the following registry key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches
    4. On the File menu, click Export, and then click Desktop, type VolumeCaches in the File name box, and then click Save.

    Note This step creates a backup of the VolumeCaches registry key. If you experience any problems after you complete the steps that are listed in this procedure, you can use this backup to restore the VolumeCaches key to its original state. To restore the key, double-click the VolumeCaches.reg file on your desktop, and then click Yes.
    5. Expand the following registry key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches
    6. Delete the Compress old files registry key.
    7. Quit Registry Editor.

    http://support.microsoft.com/default.aspx?scid=kb;en-us;812248#kb3

    Regards
     
  3. GStam66

    GStam66 Private First Class

    So, basically, i can do this whenever DiskCleanup doesnt work?

    What do i do with the exported VolumeCaches on my desktop?
     
  4. bchivers

    bchivers Private First Class

    Here is a better disk cleanup complimants of tweakxp.com

    This tip will show you how to create an unattended disk cleanup which will also empty your prefetch folder. This tip assumes you have Windows XP installed in c:\windows.

    Step 1.
    Create a new text file and place the following contents inside:

    c:\windows\system32\cleanmgr.exe /dc /sageset: 1
    c:
    cd \
    cd c:\windows\prefetch
    del *.* /q

    Step 2.
    Save the file, changing the extension from .txt to .bat
    For this tip's purpose, we will call it clean.bat

    Step 3.
    Execute the file. This will run the Disk Cleanup program in a special mode which asks what items you will want cleaned when Disk Cleanup performs an unattended cleanup. Check the items you wish to have cleaned up, then click OK.

    Step 4.
    Right-click on the clean.bat file and click edit. Change the first line to read:

    c:\windows\system32\cleanmgr.exe /dc /sagerun: 1

    Step 5.
    Save the file. You can execute this file in place of running Disk Cleanup, or, to have this program run unattended, run the Add Scheduled Task Wizard in the Control Panel and create a scheduled task using the clean.bat file you just created.

    Note: This cleanup script will also clear windows prefetch directory. Often this directory can become cluttered with old appication and a cleaning would free up disk space but it will result in a one time performance decrease and windows has to rebuild the cache with active software afterwards.
     
  5. GStam66

    GStam66 Private First Class

    So, there's no side effects to using this method, right? I mean, nothing will get screwed up, right?

    I know that tampering with the registry is risky, so i guess ill try making the .bat file.

    Thanks for your help, ill post to tell you if it worked!
     
  6. bchivers

    bchivers Private First Class

    I have had no problems with this just follow it word for word. :D
     
  7. GStam66

    GStam66 Private First Class

    so after step 4, should it look like this?

    h:\windows\system32\cleanmgr.exe /dc /sagerun: 1
    h:\windows\system32\cleanmgr.exe /dc /sageset: 1
    h:
    cd \
    cd h:\windows\prefetch
    del *.* /q

    or this?

    h:\windows\system32\cleanmgr.exe /dc /sagerun: 1
    h:
    cd \
    cd h:\windows\prefetch
    del *.* /q


    You said to change the first line, and i wasnt sure if u meant to change the existing first line, or to change the file so that the first line read h:\windows\system32\cleanmgr.exe /dc /sagerun: 1


    Anyway, it worked, and I am very grateful for all the help I received here!
     
  8. NICK ADSL UK

    NICK ADSL UK MajorGeeks Forum Administrator Staff Member

    Your welcome and many thanks bchivers for stepping in :)
     
  9. GStam66

    GStam66 Private First Class

    for future reference, should the text look like this:

    h:\windows\system32\cleanmgr.exe /dc /sagerun: 1
    h:\windows\system32\cleanmgr.exe /dc /sageset: 1
    h:
    cd \
    cd h:\windows\prefetch
    del *.* /q


    or this:

    h:\windows\system32\cleanmgr.exe /dc /sagerun: 1
    h:
    cd \
    cd h:\windows\prefetch
    del *.* /q



    So i can do this again in the future, without having to create the file again.
     
  10. bchivers

    bchivers Private First Class

    You what the first line to read
    c:\windows\system32\cleanmgr.exe /dc /sageset: 1
    This is for setting it up (choosing which file to delete). You only need to do this once. Then you change it to
    c:\windows\system32\cleanmgr.exe /dc /sagerun: 1
    and leave it there. I hope this is what you meant. Your welcome,glad I was able to help :)
     
  11. GStam66

    GStam66 Private First Class

    so the final program should read:

    h:\windows\system32\cleanmgr.exe /dc /sagerun: 1
    h:
    cd \
    cd h:\windows\prefetch
    del *.* /q

    I got it. Thanks again! :)
     
  12. bchivers

    bchivers Private First Class

    This is correct if your hard drive is h:\
    You only need to use the sageset: 1 to set it up. Once it is set use use the sagerun: 1 all the time to run the program and clean.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds