Updated 2005-11-28 01:18:14

Scott Gamon - In Brian Livingston's February 28, 2003 Infoworld column[1], he describes a way to speed up Windows disk cleaning by changing a registry setting. The script below will make (or undo) that change.

"The secret, if you don't wish to compress space but you do want to delete temporary files, is to eliminate Disk Cleanup's lengthy calculation of the possible savings from compression. This involves changing a value in the Registry."
 # SpeedClean.tcl
 #
 # Modifies the Windows registry as detailed in Brian Livingston's
 # February 28, 2003 Infoworld column:
 #
 # http://www.infoworld.com/article/03/02/28/09winman_1.html
 #
 # Example: tclsh SpeedClean.tcl => Removes registry value
 #          tclsh SpeedClean.tcl restore => Restores registry value

 package require registry

 switch --  [lindex $argv 0] {
     restore {set Value "{B50F5260-0C21-11D2-AB56-00A0C9082678}"}
     default {set Value ""}
 }

 registry set \
         {HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Compress old files} \
         {} \
         $Value

 puts "Done."

Category Windows