

%systemroot%\system32\cmd.exe /c CLEANMGR /sagerun:64
#SS DISK CLEANER WINDOWS#
To run Disk Cleanup this way regularly, you can create a shortcut which can be run from the Windows Startup folder or via a regular schedule.

Here are a set of registry entries to turn on a typical selection of cleanmgr options, these can be used with REG or Regedit to pre-populate the regisitry as a scriptable alternative to running /SAGESETĬhoose a set of options for cleanup (this will display the GUI) and Save as settings group #64: Registry settings for CLEANMGR are held in: Then to restart Windows Explorer, just run the batch file. A very large number of these can affect logon/logoff times.ĬD %userprofile%\AppData\Roaming\Microsoft\Windows\RecentĮcho y| del *.* Close Locked files by restarting Windows Explorer

The 'User Profile/Recent Items' folder can contain many more shortcuts than are useful. However if you have an application that leaves a significant number of temporary/junk files in App Data, these can be selectively removed from a roaming profile with a VBScript like this. Many files in Application Data hold system data that should not be deleted. The user's 'Application Data' folder is not available for cleanup in the above list. The Recycle Bin and Catalog Files for the Content Indexer may appear for more than one drive. Items marked with * have a option in the GUI to view the individual files. Windows error reports and feedback diagnostics Recycle Bin * (empties the recycle bin to recover the disc space) The following options can be toggled on or off when running /SAGESET: n

To enable Cleanmgr on older servers of Windows Server, open Server Manager and choose Add feature, then select "Desktop Experience"Īfter running cleanmgr on a server you may want to disable When necessary CLEANMGR can take ownership of the files before deleting them. Some cleanup options require elevation, when run without elevation the GUI will include an option which will relaunch CLEANMGR in Elevated mode.
#SS DISK CLEANER FREE#
For a drive that has more than 25% free space, deleting files will not make any difference to performance. Also assuming you have the default 'system managed size' for the page file, that will automatically shrink to fit in the available space.
#SS DISK CLEANER FULL#
Having a hard drive that is over 75% - 80% full will affect performance because file fragmentation (and automatic defragmentation) will increase. By default only the Downloaded Program Files and Temporary Internet Files will be selected. This makes the process slower to startup.Īlthough many of these files are often described as "junk" you should carefully evaluate what they do before deleting them. If CLEANMGR is run without /sageset or /sagerun, it will start by calculating how much disk space could be saved. Autoclean Analyze the system files left over from a previous Windows version/in-place upgrade.Īnd also remove those files automatically. SETUP Analyze the system files left over from a previous Windows version. VERYLOWDISK Disk Cleanup will open with all options checked, no user prompts. Normally invoked when Windows notifies that of disk space is running out. LOWDISK Disk Cleanup will open with all options checked. TUNEUP: n Run /sageset and /sagerun for the same n Selected profile will be run against each drive. Specify different tasks for Disk Cleanup to run.Īll drives in the computer will be enumerated, and the The n value is stored in the registry and allows you to SAGESET: n Display the Disk Cleanup Settings dialog box and createĪ registry key to store the settings you select. Specify the %systemroot% drive to see all the available options. NOTE: The /d option is not utilized with /SAGERUN: n. D driveletter The drive that you want Disk Cleanup to clean. SyntaxĬLEANMGR /sageset: n optionĬLEANMGR /sagerun: n option Automated cleanup of Temporary files, Internet files, downloaded files, recycle bin.
