How to automate Extended Disk Cleanup - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How to automate Extended Disk Cleanup

waynraynwaynrayn Posts: 1Member
Hi All:

I've designed a small batch file to clean out an XP laptop every time on close.

Commands are:

%SystemRoot%System32Cmd.exe /c Cleanmgr /sageset:35 & Cleanmgr /sagerun:35
undll32.exe advapi32.dll,ProcessIdleTasks
echo y|chkntfs c:
shutdown -s

The first line is to bring up the Extended Disk Clean. It does, but the Disk Clean has to be operated by clicking "Okay," rather than just automatically starting.

I am wondering if there is a command I can put it into the batch file to start the Disk Clean automatically when it appears?

Thanks very much,

Wayne (waynrayn)

Sign In or Register to comment.