Vista's Disk Cleanup utility has a "hidden" disk cleanup utility that gives you access to additional space-recovering, speed-booting options. Called cleanmgr.exe, you can use this utility for advanced cleanup, to get rid of old installation files, error files, unnecessary upgrade files, and any checkdisk (CHKDSK) fragments that may be stranded on the hard drive.
These advanced cleanup options are maintained and managed via settings that are stored by a feature called a System Agent, or sage for short. You can use the System Agent (sage) to set your options, by creating a sageset. Vista will use the settings contained in the disk cleanup sageset to determine the particular files you want it to delete in a disk cleanup.
- Click on the Vista orb to open the Start menu
- Type cleanmgr /sagerun:1 into the Start Search box.
- Press Enter.
Vista will run automatically run the disk cleanup in enhanced mode, cleaning out the files as you had specified. You can run this command at any time you wish.
After creating a sageset to set your Disk Cleanup options, you will create a sagerun to run those options. The sagerun is basically a system agent (sage) that will pre-define when the disk cleanup process will run. Here’s how to create a disk clean up sagerun.
- Click on the Vista Orb to open the Start menu. Click on Control Panel and then click Scheduled Tasks.
- Click on Add Scheduled Tasks. This will launch the Scheduled Task Wizard.
- Click Next. Let the system retrieve your programs, which may take a while. When it is done, an alphabetical list of programs will be displayed. It’s very likely that cleanmgr.exe won’t be listed, so click Browse? to locate it.
- Click the Windows folder in the Select Program to Schedule dialog window. Click on the system32 folder
- Click cleanmgr.exe and then click Open. Click on the radio button for specifying how often this task should be performed. Click Next. Set your time parameters and click Next.
- Enter your password if prompted and click Next again.
- Check the checkbox labeled: Open advanced properties for this when I click Finish.
- Type a space in the cleanmgr dialog, and then type /sagerun:1 after the Run: line.
- Click Apply. Click OK.
At the specified time, the disk cleanup program will run automatically.
NOTE:
- Each sageset or sagerun command is identified by a number, allowing you to differentiate one from the other. You can create a number of different clean up profiles, each one with a completely different clean up option. In this case, you will simply assign a different number to each profile. For example: /sageset:1, /sageset:2, /sageset:3, /sageset:4 e.t.c. along with corresponding commands: /sagerun:1, /sagerun:2, /sagerun:3, /sagerun:4
- You can create up to 65,535 sagesets