I used term buried because the vast bulk of page is concerned with writing a new cleanup handler from scratch. Skip that and look for the - two paragraph long - "Using the DataDrivenCleaner Object" section near the bottom of the page. Then study the table of registry values that proceeds it.
Here are a few examples to show just how easy this is. (Copy and paste into notepad. Save as a .reg file. Then double click on the file.)
Remove seldom used items from Windows Prefetch
QUOTE
Windows Registry Editor Version 5.00
; Remove seldom used items from Windows Prefetch
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Trim Prefetch]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Display"="Trim Prefetch"
"Description"="Trims items from prefetch which haven't been used in the last 3 weeks"
"FileList"="*.pf"
; Only prefetch files will be deleted.
"CSIDL"=dword:00000024
; dword:00000024 corresponds to the %SYSTEMROOT% folder
"Folder"="Prefetch"
; The CSIDL and Folder entries get combined
; on most systems CSIDL + FOLDER = C:\Windows\Prefetch
"LastAccess"=dword:00000015
; Ignore files that have been accessed within the last three weeks.
; Prefetch is suppose to be for frequently used items.
; If we haven't used the item in over three weeks, it may not make sense to prefetch it.
"StateFlags0000"=dword:00000002
"StateFlags"=dword:00000000
; Remove seldom used items from Windows Prefetch
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Trim Prefetch]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Display"="Trim Prefetch"
"Description"="Trims items from prefetch which haven't been used in the last 3 weeks"
"FileList"="*.pf"
; Only prefetch files will be deleted.
"CSIDL"=dword:00000024
; dword:00000024 corresponds to the %SYSTEMROOT% folder
"Folder"="Prefetch"
; The CSIDL and Folder entries get combined
; on most systems CSIDL + FOLDER = C:\Windows\Prefetch
"LastAccess"=dword:00000015
; Ignore files that have been accessed within the last three weeks.
; Prefetch is suppose to be for frequently used items.
; If we haven't used the item in over three weeks, it may not make sense to prefetch it.
"StateFlags0000"=dword:00000002
"StateFlags"=dword:00000000
Clean %windir%\Temp which XP's Disk Cleanup normally leaves untouched.
QUOTE
Windows Registry Editor Version 5.00
; Cleans %windir%\Temp which XP's Disk Cleanup normally leaves untouched.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\SYSTEMROOT_TEMP Folder]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Display"="SYSTEMROOT Temporary files"
"Description"="Delete files and folders found the TEMP folder located in the %SYSTEMROOT% folder"
"FileList"="*.*"
"CSIDL"=dword:00000024
; dword:00000024 corresponds to the %SYSTEMROOT% folder
"Folder"="Temp"
; on most systems CSIDL + FOLDER = C:\Windows\TEMP
"Flags"=dword:00000041
;0x00000001 Search and remove recursively.
;0x00000040 Match the FileList value against directories and remove matches and all of their subdirectories.
"LastAccess"=dword:00000007
; 7 days must have elapsed since a file was last accessed or a directory was created before
; that file/directory will be considered for cleanup.
"StateFlags0000"=dword:00000002
"StateFlags"=dword:00000000
; Cleans %windir%\Temp which XP's Disk Cleanup normally leaves untouched.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\SYSTEMROOT_TEMP Folder]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"Display"="SYSTEMROOT Temporary files"
"Description"="Delete files and folders found the TEMP folder located in the %SYSTEMROOT% folder"
"FileList"="*.*"
"CSIDL"=dword:00000024
; dword:00000024 corresponds to the %SYSTEMROOT% folder
"Folder"="Temp"
; on most systems CSIDL + FOLDER = C:\Windows\TEMP
"Flags"=dword:00000041
;0x00000001 Search and remove recursively.
;0x00000040 Match the FileList value against directories and remove matches and all of their subdirectories.
"LastAccess"=dword:00000007
; 7 days must have elapsed since a file was last accessed or a directory was created before
; that file/directory will be considered for cleanup.
"StateFlags0000"=dword:00000002
"StateFlags"=dword:00000000
More through cleanup for Win98
QUOTE
REGEDIT4
; CAUTION: On some systems Internet Explorer's temporary Internet files are located
; inside this folder. If you want to preserve those files, choose a different
; location for them in Control Panel> Internet Options before using this module.
; Throughly cleans Windows TEMP folder.
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\explorer\VolumeCaches\Temporary files (Complete)]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"display"="Temporary files (Complete)"
"description"="(Revised - through cleanup.) Programs sometimes store temporary information in a TEMP folder. Before a program closes, it usually deletes this information. You can safely delete temporary files that have not been modified in over a week."
"filelist"="*.*"
"flags"=dword:00000041
;0x00000001 Search and remove recursively.
;0x00000040 Match the FileList value against directories and remove matches and all of their subdirectories.
"folder"="C:\\WINDOWS\\TEMP\\"
;Edit above location to match your system.
;"folder"="%WINDIR%\\TEMP" may work but hasn't been tested.
"lastaccess"=dword:00000007
"StateFlags"=dword:00000001
"StateFlags0000"=dword:00000002
; CAUTION: On some systems Internet Explorer's temporary Internet files are located
; inside this folder. If you want to preserve those files, choose a different
; location for them in Control Panel> Internet Options before using this module.
; Throughly cleans Windows TEMP folder.
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\explorer\VolumeCaches\Temporary files (Complete)]
@="{C0E13E61-0CC6-11d1-BBB6-0060978B2AE6}"
"display"="Temporary files (Complete)"
"description"="(Revised - through cleanup.) Programs sometimes store temporary information in a TEMP folder. Before a program closes, it usually deletes this information. You can safely delete temporary files that have not been modified in over a week."
"filelist"="*.*"
"flags"=dword:00000041
;0x00000001 Search and remove recursively.
;0x00000040 Match the FileList value against directories and remove matches and all of their subdirectories.
"folder"="C:\\WINDOWS\\TEMP\\"
;Edit above location to match your system.
;"folder"="%WINDIR%\\TEMP" may work but hasn't been tested.
"lastaccess"=dword:00000007
"StateFlags"=dword:00000001
"StateFlags0000"=dword:00000002