Windows XP/7 Disk Cleanup

I am trying to automate Windows Disk Cleanup. The steps I have carried out
1. Set the items to cleanup at cmd prompt ran cleanmgr /d c: /sageset:100
2. Created a batch file called cleandisk.bat with contents cleanmgr /sagerun:100
3. Created the task and set to run with Administrator permission and to run when not logged in.

1. Does it run for all profiles or only the one that is logged in?
2. I manually ran it and the recycle bin for the network user was not emptied.
3. What is the best way to cleanup the computer automatically, alternatives to the above?

Who is Participating?
veeraConnect With a Mentor Commented:
you must install powershell to execute above script in Windows XP
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.