Jump to content

Automate Cleanmgr (disk clean up)


jpatto

Recommended Posts

I managed to figure out (or half figured) how to kick in disk cleanup so its automated. I use

cleanmgr /d c: /sageset:100

But

1. This brings up the dialog box to prompt the user to select what to delete - which i dont want i want it to be fully automated.

2. I want some sections to not be run i.e. recycle bin.

Not sure what im missing - any ideas on this one?

thanks

Link to comment
Share on other sites


Cleanmgr commands are /d , /sageset, and /sagerun. You can only run one at a time, so you can't specify the drive letter and use sageset at the same time. But to answer your question, Start > Run > cleanmgr /sageset:100, choose what you want to delete by placing checks in the boxes, and click OK. Then right click on your desktop and make a new shortcut. In the box for the location of the item, type cleanmgr /sagerun:100, click next, enter a name for the shortcut and click finish. Clicking on the shortcut will now run cleanmgr on each drive with the options you selected.

Edited by krose
Link to comment
Share on other sites

Cleanmgr commands are /d , /sageset, and /sagerun. You can only run one at a time, so you can't specify the drive letter and use sageset at the same time. But to answer your question, Start > Run > cleanmgr /sageset:100, choose what you want to delete by placing checks in the boxes, and click OK. Then right click on your desktop and make a new shortcut. In the box for the location of the item, type cleanmgr /sagerun:100, click next, enter a name for the shortcut and click finish. Clicking on the shortcut will now run cleanmgr on each drive with the options you selected.
I tried this but it displays the dialog box to the user. What im aiming to do is run this across the network by a task scheduler but run it silently without anyone knowing its running (other than us) - is that possible? i know how to set the schedule but not sure how to stop the dialog box from appearing.
cleanmgr /sagerun:99

Whats the difference between cleanmgr /sagerun:99 and cleanmgr /sagerun:100 (or any other number for that fact?)

Thanks everyone

Link to comment
Share on other sites

There is no way that I know of to have it run totally silent. You should try CCleaner instead, it is actually more thorough than cleanmgr and you can select what you want cleaned as well. It can be run silently by using the command switch /auto.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...