disk clean up

0 Comments   [ - ] Hide Comments


Please log in to comment

Community Chosen Answer




Answered 12/27/2012 by: dugullett
Red Belt

  • Remember to form your answer in the form of a question.
    • Nuke it from orbit, it's the only way to be sure.
Please log in to comment
Answer this question or Comment on this question for clarity



Microsoft offers a crowd-sourced repository for scripts. If you're looking for "clean up" scripts, you can check here:



Answered 12/27/2012 by: tshupp
Second Degree Black Belt

Please log in to comment

Was someone just looking for the points when posting a questions???? Come on...admit it =)

Answered 12/27/2012 by: nshah
Red Belt

  • hey you just got points for answering
Please log in to comment

I would run sageset:1 on a test box built for this purpose, then export the registry key for sageset [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches] to a network drive accessable to the target machine.

create a "verify" batch file in kbox scripting that will import that sageset registry key.  for example mine looks like this "regedit /s \\roadster\IT-Systems\xpscripts_donotdelete\sageset.reg"  Replace \\roadster\it-systems... with the path to your sageset registry key

then create an "on success" script that will run disc cleanup with the parameters you selected on your test box.  I chose "on sucess, run a batch file" and typed in "c:\windows\system32\cleanmgr.exe /sagerun:1"  that referenced the settings that were imported by the first step above.

I'm assuming you're using the KBOX 1000 scripting for this, otherwise the commands are a bit more convoluted but doable.  Hope this helps

Answered 12/27/2012 by: Strangeronfire
Senior Yellow Belt

Please log in to comment

DBan it! 



Answered 12/28/2012 by: OSILayer3
White Belt

  • hahahaha. I'm sure he isn't trying to nuke the contents. I'm assuming he is just wanting a disc cleanup script that can be pushed out to multiple computers.
Please log in to comment