"CCLEANER /AUTO /SHUTDOWN" seems to work, or fails due to race hazards.
There is a 95% chance of failure.
I originally thought there was a 95% chance of success in shutting down,
with a 5% chance that it would abort and Windows Task Manager / Processes would show many "services" processes had been terminated,
and in that situation it was guaranteed that repeating "CCLEANER /AUTO /SHUTDOWN" would NEVER succeed,
I then had to shut-down the computer in the "normal" fashion.
I now find that shutdown is 100% successful so long as CCleaner has NOT previously run since start-up,
and fails 100% if CCleaner was run normally (i.e. without /SHUTDOWN etc.) and then run with /SHUTDOWN.
I believe there is a race hazard.
So long as CCleaner finds and deletes stuff, it takes some time, and the eventual /SHUTDOWN will work.
If CCleaner cannot find anything to delete, it issues /SHUTDOWN incorrectly, and/or Windows "drops the ball" because it has not yet recovered from Launching CCLeaner.
I seem to avoid the problem if I run Firefox a bit after using CCleaner normally before I use it to shut-down.
Would it be better if CCleaner had a 10 second time-out after cleaning before it did the shut-down ?
This should help if it is Windows itself that is dropping the ball.
ALSO - is it dangerous to shut-down instantly after cleaning ?
I am concerned that if CCleaner finds plenty of stuff to clean,
then files are deleted and contents of directories are re-written,
and if CCleaner immediately then does a shut-down, perhaps the cache may not be flushed to the hard drive.
Could this explain the occasional System Event warning
FTDisk The system failed to flush data to the transaction log. Corruption may occur.
ANOTHER PROBLEM - MY LAPTOP BATTERY WAS EXHAUSTED OVERNIGHT.
Every morning I switch on the battery charger mains supply and after about 1 second the Laptop battery LED comes on for half a second as its overnight leakage is replenished. Then I switch on the laptop and after logging on I can see the battery is 99% fully charged.
Just once, two weeks ago, the LED stayed on continuously, and after waiting 20 seconds I switched on the laptop and logged on. The battery was at 0%, and very gradually a single % point at a time it increased to about 98% after 2 hours.
I strongly suspect that where a /SHUTDOWN failure will kill various services/processes, but leave a visible desktop, it may possibly blank out the monitor so that when I have prepared for bed I can think that shut-down was successful and switch of the mains power supply - but in fact bits of the computer, or perhaps USB peripherals, can still be sucking juice out of the battery till the morning.
I am using XP Home with SP3. and Ccleaner 2.20.920
Alan