With cleanmgr.exe that you can configure specific tasks
to perform the desired cleanups.
To configure Disk Cleanup
Manager:
-
Select
StartRun.
-
Type the following text
in the
Run dialog box:
cleanmgr
/sageset:
n,
where
n can be any number between
0 and 65535.
-
Select the items that
you want to be cleaned.
-
Note: You can also create a shortcut
in your Windows folder to
cleanmgr /sagerun:
n (where
n is the number in step 2). Type a name for
the shortcut (for example, cleanuptask).
-
If you want to verify
the settings, repeat steps 1 through 3.
The following steps
apply to Windows XP Professional and Windows Server 2003:
-
-
-
-
Select
Disk
Cleanup or the shortcut that you created in step 2.
If you are using the shortcut, select
Next.
-
Select
Next and configure.
Note: You must provide your user
ID and password to run this task.
-
If not using the shortcut,
then select the
Open advanced properties for
this task when you click
Finish.
-
Select
Finish when the step is complete.
-
If you are not using
the shortcut, then the
Properties dialog
box should be displayed. Select the
Task tab.
-
In the
Run text box append
/sagerun:#
, where # is the number from step 2.
-
Check
Event
Viewer for any errors under
Application.
The following steps
apply to Windows Vista and Windows 7.
-
-
Select
Create
Basic Task.
-
Type a name for the
task in the
Name field.
-
-
Select the appropriate
triggers and options.
Note: Select
Next to advance through the trigger options.
-
Select
ActionStart Program.
-
-
Type
cleanmgr
in the
Program/script: text box.
-
Type the appropriate
arguments for
:/sagerun:#,
where #
is the number from step 2.
-
-