How
to Keep your Computer Running
|
| Click on Start / Run... Enter the command "cleanmgr /sageset:99" to open a Disk Cleanup Settings window. | ![]() |
![]() |
This is where you can set the options you want run when the Disk Cleanup Program is running. Select the cleanup options you wish to run automatically. Although this is a personal choice, we'd recommend you select to cleanup any temporary files, Downloaded Program Files, Debug Dump Files, and Old Chkdsk Files. After choosing your options, click OK. |
Next, you need to create what's called a batch file. To do this, open a blank text document in Notepad or Wordpad (found in Start / All Programs / Accessories) and enter the following lines:
cleanmgr /sagerun:99
defrag c:
If you have more drives you wish to automatically defragment, simply add a new defrag command on each line. (i.e. "defrag d:")
When this batch file runs, it will now run the Disk Cleanup according to the settings you chose earlier with the "cleanmgr /sageset:99" command. After cleaning up your disk, it will then defragment your hard drives in the order you put them in the batch file.
Save the batch file somewhere you’ll remember on your PC's hard drive like your "My Documents" folder with an appropriate name like “cleanup.bat”. The file name must end with a ".bat" to let Windows know it's a batch file.
That was the hard part. Now all that’s left is to have Windows automatically run the cleanup specified in this batch program.
Go to Scheduled Tasks by clicking Start / All Programs / Accessories / System Tools / Scheduled Tasks.
1) Double click "Add Scheduled Task" to open the Scheduled Task Wizard.
2) Click Next and then Browse for your batchs file. (You did save it somewhere memorable like we said, right?)
3) Double click the batch file.
4) Replace the file name description with something meaningful like "Hard Drive Cleanup".
5) Select how often you would like to run the scan. We'd recommend you do this task at least once per month. Ideally, once per week if you use your computer frequently.
6) Click Next and then set the time you would like the task to run.
7) Click Next. If you have a username and password set on your PC, you'll need to enter those details in order for Windows to perform this task in the background (i.e. if you have a screen saver running at the scheduled time).
8) Click Next and then Finish.
That's it! Windows will now automatically clean up and defragment your hard drive(s).
Note that your computer must be on for the scheduled tasks to run. If it not on at the time of the scheduled task, the task won’t not run until the next time your computer is on at the scheduled time.
You can read more about automating disk cleanup, by going to this Microsoft
article - http://support.microsoft.com/?kbid=315246&sd=RMVP.


