Jump to content
CCleaner Community Forums
bandit12345

CCleaner PC Shutdown

Recommended Posts

I recently discovered that CCleaner no longer shuts down my PC.

This may be due to a recent Microsoft Windows Update that changed the interactions between certain installed

programs.

 

Normal method:

---------------------------

1) I created a CCleaner.exe shortcut onto my desktop

2) In the shortcut Properties, I added the line: "C:\Program Files\CCleaner\CCleaner.exe" /AUTO /SHUTDOWN in the Target: field.

 

CCleaner starts to run as normal, but the PC won't close, only my MSE Antivirus closes.

 

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

 

To resolve the issue, I created a very simple 2 second batch file.

-------------------------------------------------------------------------------------

 

1) Open a new .txt document and paste the following into the document.

"C:\Program Files\CCleaner\CCleaner.exe" /AUTO /SHUTDOWN

"C:\Program Files\CCleaner\CCleaner.exe" /AUTO /SHUTDOWN

2) Save as CCleaner2 and close the document

3) Rename the document from CCleaner2.txt to CCleaner2.bat

DONE!

Now when CCleaner runs to clean and shut down the PC, it'll run twice.

I've tested this method and it always works!

 

 

 

I even created a CCleaner_Shutdown.exe with the same script.

Share this post


Link to post
Share on other sites

Computer not shutting down when requested can simply also mean a registry "tweak" is needed to fix that behaviour, you can find this info on some Windows "tweak" sites.

 

You could also do this without calling CCleaner twice, using Windows shutdown, although on some computers Windows shutdown also doesn't shutdown some computers.

 

"%ProgramFiles%\CCleaner\CCleaner.exe" /AUTO
shutdown.exe -s -t 15 -c "System shutdown after CCleaner"

Share this post


Link to post
Share on other sites

I’ve been using CCleaner for a few years now and think it’s great.

I only have one issue with the program that I can’t resolve.

If I create a batch program containing the following parameters:

 

start /wait ccleaner.exe /AUTO /SHUTDOWN

 

it doesn’t always shut down the computer.

First I thought this may be an issue with Windows, but this issue occurs on several of my computers from my 2 Dell desktops (WinXP) to my 2 Toshiba laptops (WinXP) and my HP laptop (Win7).

I’ve experimented with other types of batch programs including:

 

rem STARTS THE CCLEANER PROGRAM AND CLEANS SYSTEM

start /wait ccleaner.exe /AUTO

rem STOPS THE EXPLORER.EXE PROCESS

taskkill /IM explorer.exe /f

rem TERMINATES THE SESSION OF WINDOWS WITH FORCE SHUTDOWN

start shutdown.exe /s /f

 

This batch program also doesn’t shut down the computer because the process seems to halt right after CCleaner runs.

 

I’m wondering if my 2 programs I use to convert my .bat programs to .exe might be the culprit. They are: bat2exe and Quick Batch File Compiler

 

If not, can anyone suggest a fix for the above program parameters.

 

Thanks.

Share this post


Link to post
Share on other sites

I’m wondering if my 2 programs I use to convert my .bat programs to .exe might be the culprit. They are: bat2exe and Quick Batch File Compiler

That is my my opinion a really bad move.

Why do you want to convert/compile a valid BAT file - that never makes anything simpler.

 

 

I know that XP Home never shuts down when you invoke shutdown.exe.

 

You will find a relevant link within this text :-

Unfortunately — especially on Windows XP — this option only shuts down Windows. It does not shut down your computer, at least on most hardware. For that, on Win XP (and for most Win 2000 users also), I recommend the freeware utility Shutdown.exe (not to be confused with the Windows utility by the same name) by MS-MVP Andrej Budja. I’ve seen several shutdown utilities recommended, but this is the only one that I’ve seen actually shut down Windows XP and then powerdown the computer behind it. For more information on the tool, see here. After you place this utility in the root folder of C:, the commands for a shutdown, restart, or hibernate (respectively), each without a time delay, would be shutdown -u -t 0 for shutdown, shutdown -r -t 0 for restart, and shutdown -h -t 0 for hibernate.

 

 

 

The link is clickable if you go to

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

Share this post


Link to post
Share on other sites

Thanks for the reply Alan_B

 

Why? Are the commands in an .exe altered from a .bat file?

I was under the impression that it remains the same, only that it becomes an executable.

 

I’ve been doing some reading and came across an article found at:

http://www.beyondlogic.org/solutions/shutdown/shutdown.htm

It states that the Windows Shutdown.exe may not actually turn off your ACPI compliant computer. If this is the case, I assume that CCleaner.exe /SHUTDOWN is expected to not work on most computer systems.

 

I'm just trying to find a way to run CCleaner and power down the pc without coming home 10 hours later and finding the PC still on.

 

Any suggestions?

Share this post


Link to post
Share on other sites

Why? Are the commands in an .exe altered from a .bat file?

I was under the impression that it remains the same, only that it becomes an executable.

I am not convinced that your impression is correct.

You refer to "bat2exe and Quick Batch File Compiler"

unfortunately they are not clickable and I have insufficient interest to search for whatever they are,

and even given the links I have no interest in examining their source code to see what errors it contains.

 

It is not CCleaner's fault if it fails to function when you have allowed some other third party to mutilate it.

THEREFORE THIS IS NOT A VALID BUG REPORT.

You first need to use it properly as intended.

 

I’ve been doing some reading and came across an article found at:

http://www.beyondlog...wn/shutdown.htm

It states that the Windows Shutdown.exe may not actually turn off your ACPI compliant computer.

That is stale news - I already gave you a quote

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

 

If this is the case, I assume that CCleaner.exe /SHUTDOWN is expected to not work on most computer systems.

ABSOLUTELY NOT.

It was a defect in XP, as noted in both my link and your link.

Further, I believe it was fixed-fixable by SP3 for all but XP Home edition.

I believe CCleaner was created before XP predominated - FileHippo can deliver from archives

b.gifCCleaner 1.16.082

Released: 27 Nov 2004 (6 years 10 months ago)

Therefore it was expected to work for most WINDOWS computer systems

and only fails because Microsoft chose to leave the Home version of XP as the degraded poor man's choice.

 

I'm just trying to find a way to run CCleaner and power down the pc without coming home 10 hours later and finding the PC still on.

 

Any suggestions?

I already gave you a link for a replacement shutdown.exe

and your link also gives a link for shutdown101.zip

How many more options do you need ?

 

NB My link gives a shutdown.exe that still works if you call it shutdown2.exe so that both original and new versions can co-exist.

An alternative would be to NOT place the new shutdown.exe in system32,

but in the same folder that contains CCleaner.exe because executables in the Current Directory take precedence over those held in %PATH%.

Share this post


Link to post
Share on other sites

Hello again Alan_B

 

Again, thanks for the info, despite your condescending attitude.

Obviously people who write in for technical input are at different levels of computer knowledge. Only arrogance assumes otherwise – as by your tone.

 

Your belittling those who are trying to learn is not appreciated!

 

As far as Windows is concerned, if you had bothered to properly read my “original” post, you would see that I am running Windows XP Pro SP3 and Windows 7 Ultimate SP1, so your remarks to Windows Home are irrelevant!

 

As far as your suggestion to run third-party software, that makes no sense.

What you’re suggesting is to work around the problem without addressing it.

“My hand hurts so I’ll use my other” is just sloppy computing.

 

Any real diagnostician will get to the heart of the problem and address it, not dance around it.

 

Thankfully I came across a blog with a Microsoft technician that fixed the issue, yes fixed!

 

In case you are so inclined to educate yourself of how, I suggest you learn about the Microsoft Windows NT 3.51 Resource Kit

 

Best of luck with whatever it is you think you do!

Share this post


Link to post
Share on other sites

CORRECTION

 

Nowhere did you refer to your O.S. in your first post

Nowhere in your second post did you exclude XP home - you merely referred to XP which by default is HOME unless otherwise specified.

YOU ARE RUNNING THIRD PARTY SOFTWARE when you scrunch up CCleaner.exe with a batch script into a different executable without any manifest.

 

I chose to use a light weight executable created by a MSVP

That was for me more convenient and much smaller than using the "Microsoft Windows NT 3.51 Resource Kit".

In fact I think that such resources were restricted to PRO and not Home at that time.

I remember that I sorted out how to fix the problem when XP PRO was fixed but not XP Home.

 

You have not fixed your problem - you just found another way around a problem that Microsoft created and failed to correct.

Your solution is no more valid than mine.

 

I gave you valid solutions to badly presented problems.

 

Just because I criticise defects in your information does not mean I am condescending.

You had the problem - you should have defined it more clearly in the first place.

Share this post


Link to post
Share on other sites
Thankfully I came across a blog with a Microsoft technician that fixed the issue, yes fixed!

 

That being the case, there's no further purpose to this thread so I'll close it.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...