Jump to content

Cure for Ccleaner failure to Shutdown + Diagnostics.


Alan_B

Recommended Posts

CCleaner /AUTO /SHUTDOWN has a 5% to 99% chance of failure, as I reported on 16th March 2010 in

http://forum.piriform.com/index.php?showtopic=27266

 

When I first choose to clean and shutdown, there is a 5% chance that the shutdown process will be aborted,

after which repeated attempts have a 99% chance of failure because CCleaner has "gone done something bad."

 

I experienced it with CC v 2.20.920, and more recently with both 2.35.0.1223 and 3.2.0.1343.

 

I have Admin authority on XP Home + SP3, and also require /SHUTDOWN to work for my non-admin daughter.

 

========================================================================================================

 

THE CURE IS :-

===========

 

Use a BAT script that concludes with

CCLEANER /AUTO
START "ALL DONE" shutdown2.exe -u -t 20
EXIT

 

This requires the script to be in the same folder as CCleaner.exe,

and shutdown2.exe should either be there also, or perhaps in Windows\System32.

You can download Shutdown2.exe from

http://www.aumha.org/freeware/freeware.php#shutdown'>http://www.aumha.org/freeware/freeware.php#shutdown

The direct download link is

http://www.aumha.org/downloads/shutdown.zip

I trust http://www.aumha.org

If you want a little more excitement you can find various Torrent sites ! ! !

 

N.B. The above comes in a 14 KB ZIP which when unzipped is 32 KB Shutdown.exe

This works just as well with either its original name or as shutdown2.exe.

The new name is recommended to avoid confusion with the defective shutdown.exe in system32.

N.B. system32 version only works under admin authority and needs arguments :-

START "ALL DONE" SHUTDOWN -s -t 10 -c "CClean + Shutdown" -d p:2:4

 

The script refrains from using the unreliable CCLEANER /AUTO /SHUTDOWN option,

and instead launches shutdown2 which gives 20 seconds for the script to EXIT and for the O.S. to "do those things we have left undone" ! ! !

 

I have seen repeated instances where the completion of "CCLEANER /AUTO /SHUTDOWN" has been followed by the EXIT and the end of the BAT script, but 6 or 7 seconds later a small window opens with a progress bar, and for about 6 seconds it announces on 2 lines

Please wait while deleting browsing History

Deleting Forms Data

Once it has done that the CCleaner /shutdown is aborted and there-after every time I run the script another 7 seconds of progress bar occurs.

I have in my system event log 24 instances at 40 second intervals of

"The attempt to power off ACER-311VPBCEH0 failed".

 

I assume that when CCleaner deletes a file it does not flush the disc cache to ensure completion before moving on - it assumes the O.S. will keep everything in order.

My best guesses are that similarly it may depend upon the O.S. to delete Browsing History etc,

and that the first 7 seconds should be long enough to complete but perhaps a flag is not cancelled correctly hence it still took another 7 seconds for each of the next 23 attempts.

 

========================================================================================================

 

DIAGNOSTICS :-

===========

 

When I was using the /SHUTDOWN option there was a 5% chance of failure,

and when it failed the system event log was given the message

"The attempt to power off ACER-311VPBCEH0 failed",

but there was no visible or audible indication of failure, other than the desktop did not vanish.

BUT EVERY SUBSEQUENT ATTEMPT had the same additional error posted in the system event log

and an audible ping as a lightening fast error message popped on and off the screen.

It took me 3 or 4 attempts to read each word. I think the message was to the effect

"Windows is Currently in the middle of a long operation"

 

To slow down the error message I put a heavy load on the CPU with

CCLEANER /AUTO /SHUTDOWN
START "HighPriority Time Gobbler" /HIGH TESTX.BAT
EXIT

PLUS the script TESTX.BAT to steal 90% of the processor cycles.

ECHO %TIME%
PING 127.0.0.1 -n 2 > NUL
REM Without that PING delay the previous script will get no CPU cycles to reach its EXIT
SET B=0
ECHO %TIME% %B%
FOR /L %%a IN (1,1,99999) DO SET /A B+=1
ECHO %TIME% %B%
PAUSE
EXIT

 

The result was almost generally

 

About 4 seconds after CCLEANER has closed an error message

Windows is Currently in the middle of a long operation

Either wait for the operation to finish,

or cancel it before you quit windows

Pig Ignorant Windows never bothers to tell me what the long operation is no matter how essential that information is,

though in this case I guess the "normal priority" operation of the CCleaner invocation of closure has either given up waiting for "High priority" TESTX.BAT to give it some CPU cycles, or maybe the O.S. does not like low priority processes trying to terminate higher priority, BUT the warning could also apply to some other cleansing action that CCleaner previously launched and has not yet terminated.

 

A further 2 or 3 seconds later there are one (or sometimes two) progress windows

When there are two the lower one is unreadable, obscured by being slightly to the right and below the top window

 

The top progress Window reads

Please wait while deleting browsing History

Deleting Forms Data

The progress bar may remain for 6 seconds before ending

Remarkable features are that the progress bar shows the recycle bin icon

and nothing arrives in the recycle bin

AND THERE IS NOTHING TO DELETE

I have not been on the Internet since start-up,

and I have just run CCleaner in Manual mode with the same INI files and it found nothing to zap

BUT immediately after that I run in /AUTO /SHUTDOWN mode and there appears to be History deletions pending.

 

I do not see how my TESTX.BAT consumption of CPU cycles can spuriously cause the O.S. to make me

"wait while deleting browsing History"

so I think it is something which CCleaner has done.

 

The old CCleaner always marked index.dat for deletion and left it for the O.S. to delete on restart.

Are there other/related flags/options that CCleaner may arrange for the O.S. to do.

 

Incidentally,when I had a run of 24 system event logs of " ... power off ... failed "

there were 3 instances of the message

Application popup: ping.exe - DLL Initialization Failed : The application failed to initialize because the window station is shutting down

and each such message was followed 3 seconds later by the next

"The attempt to power off ACER-311VPBCEH0 failed"

 

========================================================================================================

 

I will give up exploring this problem for now and just live with the shutdown2 solution.

 

I hope that if a bugfix is developed for this issue then this topic will be updated for the immediate benefit of myself and anyone else with a similar problem.

 

Regards

Alan

Link to comment
Share on other sites

  • Moderators

The new name is recommended to avoid confusion with the defective shutdown.exe in system32.

shutdown.exe on my computer isn't defective, and I use it all the time. You could extract it from the Windows setup files if yours is borked.

Link to comment
Share on other sites

shutdown.exe on my computer isn't defective, and I use it all the time. You could extract it from the Windows setup files if yours is borked.

Can we swap computers please ! ! !

 

System32\shutdown.exe is definitely defective on XP Home and probably many other Windows machines.

 

Quote below taken from

http:/www.aumha.org/win5/a/shutcut.php

Unfortunately ? especially on Windows XP ? this option only shuts down Windows. It does not shut down your computer, at least on most hardware.

 

In my specific case it is ALWAYS good to shut down Windows AND ALSO "shut down computer",

BUT ONLY WHEN LAUNCHED BY ME.

I am obviously luckier than many other users of XP and 2000.

UNFORTUNATELY when my daughter has finished using the computer then the close down fails.

 

There is a 20% failure rate when the script uses the /SHUTDOWN facility of CCleaner,

and a 100% failure rate when it uses the system32\shutdown.exe,

hence my use of shutdown2.exe

 

We are using XP Home + SP3, and my daughter is a user without Admin rights.

She only emails and accesses the internet for whatever,

but has no desire to install applications or have any need for Admin privileges,

so I have peace of mind knowing that if my Router firewall + my Comodo Internet Security protection should fail,

anything that pops up from Facebook etc will need to escalate from her user privileges before it can do much harm.

 

Regrettably XP Home has a special aggravation that ensures system32\shutdown fails to work without Admin rights.

 

Regards

Alan

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.