I had posted the same here but someone suggested there that I post here, so repeating here.
Problem of Disk Cleanup taking hours is not the only one, another aspect of the problem is that it has many phases that it goes through sequentially and we cannot skip though that.
When I start it, it takes long time to give the first screen of basic files.
If you chose to clean those basic files, it does so, and closes.
You have to start it afresh to clean system files.
If you want to clean system files, it still starts with basic files cleaning screen, going through entire process again dutifully.
I cannot make it directly go to system file cleaning screen, bypassing basic file cleanup.
For both, basic files, and system files, it first takes hours in figuring out what to clea, then you have to give command, and then it taken another span of hours to clean up.
I cannot make it skip that "calculation" part, and rather directly just clean it, and clean it both, basic and system files in one go.
One method could be that we be allowed to run Disk Cleanup throught some batch file and it runs unattended. We can give the command two times, one for basic files, then for system files, and it does its long steps in the background. We don't have to standby to attend to it. There could be command line options that can tell whether to clean basic files of system files or both, and whether to first calculate, or directly go to cleaning anyway. That will save a lot of time and attention one needs to pay to it.
if it uses dism, are there such options in dism commands to run directly as required above?
If someone knows how to do any of the above (different from default sequence), please share.
How can I run Disk Cleanup unattended as described above?
I am on w8.1-64 bit, but the same problem is there in all windows (7, 10...).