• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Disk Cleanup (cleanmgr) Question.


Bow Down to the King
Political User
Good morning.

I am in the process of automating the disk cleanup manager using scheduled tasks. I have set my DWORDS in the registry for sagerun to automatically delete the files I want.

cleanmgr /d C: /sagerun:0200

However, cleanmgr seems to only want to delete files for the profile it is being run under. So if the local administrator is the one running the task only its files will be deleted. Does anyone know of a way to make it scan all profiles on the workstation? My normal configuration for each workstation is:

local administrator
network administrator
network users added to the workstation

Thank you.


OSNN One Post Wonder
Did you ever find out how to do this. I have the same problem with approx. two hundred lab machines with multiple users logging into these machines.


Computer Genius
it can't be done with cleanmgr. if you want to clean files from other profiles, you'll have to create a batch file to do it manually for each directory and or file(s). (cleanmgr will only clean on the current profile. you can set it to run as a different user from a scheduled task, if that would accomplish what you wanted...)

Members online

No members online now.

Latest posts

Latest profile posts

Perris Calderon wrote on Electronic Punk's profile.
Ep, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there https://tinyurl.com/ycpxl
Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
What a long strange trip it's been. =)

Forum statistics

Latest member