

sagerun:n - This switch runs the specified tasks that are assigned to the n value by using the /sageset switch. To get all the available options when you use the /sageset switch, you may need to specify the drive letter that contains the Windows installation.įor more information, see Registry key information. The n value can be any integer value from 0 to 65535. The n value is stored in the registry and allows you to specify different tasks for Disk Cleanup to run. sageset:n - This switch displays the Disk Cleanup Settings dialog box and creates a registry key to store the settings you select.

The /d switch isn't used with /sagerun:n. d : - This switch selects the drive that you want Disk Cleanup to clean. Disk Cleanup supports the following command-line switches: You can start the Disk Cleanup tool by running cleanmgr.exe, or by selecting Start > Programs > Accessories > System Tools > Disk Cleanup. You can then schedule the task to run at a specific time by using the Scheduled Tasks tool.Īpplies to: Windows Server 2008 R2 Service Pack 1, Windows 7 Service Pack 1 Original KB number: 253597 Command-line switches You can configure cleanmgr.exe with command-line switches to clean up the files you want. cleanmgr.exe is designed to clear unnecessary files from your computer's hard disk.
#CLEAN DISK SECURITY FULL HOW TO#
This article describes how to run the Disk Cleanup tool ( cleanmgr.exe) by using command-line switches.
