Trilight Zone Forum Index Trilight Zone
Privacy & Anonymity is our specialty !
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Automating the Windows Disk Cleanup tool

 
Post new topic   Reply to topic    Trilight Zone Forum Index -> windows
Author Message
digital8
Second Lieutenant


Joined: 29 Sep 2005
Posts: 1002

PostPosted: Fri Oct 07, 2005 11:55 am    Post subject: Automating the Windows Disk Cleanup tool Reply with quote

I recently became curious if the Windows Disk Cleanup tool could be automated so that the task of performing cleanup operations on client computers could be done on a routine basis without requiring user intervention. I looked around a bit, but didn't find anything that had already been done or that suggested a proper method on filling my goal. I ended up using the NTRegMon tool from www.sysinternals.com to monitor the registry of a system while I ran the Disk Cleanup tool. The sample SMS Installer script is what I came up with.

Basically, the tool accepts a number of command line parameters to dictate what actions are to be intiated, modifies the appropriate registry entries, and then launches the cleanmgr executable.

Available command line parameters:
-ASTF = Active Setup Temp Folders

-COF = Compress Old Files

-CIC = Content Indexer Cleaner

-DPF = Downloaded Program Files

-ICF = Internet Cache Files

-MDF = Memory Dump Files

-MOTF = Microsoft Office Temp Files

-MERTF = Microsoft Event Reporting 2.0 Temp Files

-OSF = Office Setup Files

-OF = Offline Files

-OPF = Offline Pages Files

-OCF = Old Chkdsk Files

-RB = Recycle Bin

-RDCF = Remote Desktop Cache Files

-SLF = Setup Log Files

-SR = System Restore

-TF = Temporary Files

-TOF = Temporary Offline Files

-UBI = Uninstall Backup Image

-WWC = WebClient and WebPublisher Cache
This code referenced here is just a proof of concept project for me and I highly suggest, if you are interested in using this in your environment, that you spend some quality time to verify that everything works as expected.

This tool was tested on a Windows XP SP2 system which had Office 2003 installed. I hope you find this useful.

The code can be found here: 10309SilentCleanmgr.zip
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Trilight Zone Forum Index -> windows All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group