Jump to content

Adding "Hibernate" Option to CCleaner


egnm1969

Recommended Posts

Hi all,

I see that we now have the option to Shutdown the machine once CCleaner is running in the background, but I was wondering would it be possible to add to CCleaner's context menu (in addition to the already existing Shutdown), the option to "Hibernate After Clean", as some people don't necessarily want to completely shutdown their machines, and prefer to just Hibernate once they've finished...

 

Here's hoping :blink:

 

Thanks

 

Ed

Link to comment
Share on other sites

Hi all,

I see that we now have the option to Shutdown the machine once CCleaner is running in the background, but I was wondering would it be possible to add to CCleaner's context menu (in addition to the already existing Shutdown), the option to "Hibernate After Clean", as some people don't necessarily want to completely shutdown their machines, and prefer to just Hibernate once they've finished...

 

Here's hoping :blink:

 

Thanks

 

Ed

There is no hibernate.exe like there is for shutdown.exe in C:\WINDOWS\system32 Folder so I doubt it would be possible.

"Education is what remains after one has forgotten everything he learned in school." - Albert Einstein

IE7Pro user

Link to comment
Share on other sites

@mushu13 - Exactly what I was thinking could be added, as I use this command line in Newsleecher to tell it to hibernate when it's finished downloading:

 

rundll32 powrprof.dll,SetSuspendState

 

@Yokenny - Close, but no banana ;)

 

Here's hoping it might be added one day...

 

:rolleyes:

Link to comment
Share on other sites

This can be achieved using WSH.

 

 

DIM WshSet Wsh = WScript.CreateObject("WScript.Shell")Wsh.Run "C:\Program Files\CCleaner\CCleaner.exe /AUTO", 1, True 'The True flag causes WSH to wait for CC to exitWsh.Run "RunDll32.exe powrprof.dll,SetSuspendState", 1, False 'We use False flag so WSH isnt running while in hibernateSet Wsh = nothingWScript.Quit

 

Open Notepad. Copy & paste. Adjust the path for CCleaner.exe on line 4 as needed. File menu, Save As (not save) for the file name type: CCSleep.vbs

In the file type box, click the drop down and select "All files"

 

Edit: This assumes you enabled the option in CC to close after cleaning

Link to comment
Share on other sites

Haven't I seen you somewhere before on this forum Disk4mat ? :D

Yet again Disk4mat you've outdone yourself :rolleyes: I just tried the script you left and it worked fine apart from one correction. Seems the vbs script under XP only accepts ye olde 8.3 filenaming as I had to rename line 4 to:

 

Wsh.Run "C:\Progra~1\CCleaner\CCleaner.exe /AUTO", 1, True 'The True flag causes WSH to wait for CC to exit

 

... as it balked at the Joliet method. Strange but true... it's probably my laptop :lol:

 

Well this quickfix will do for the mo, and hopefully someone at Piriform might one day incorporate this request into CCleaner to make it even better than it is already now :D

 

Thanks Disk4mat & everyone else who helped out for this fix... Much appreciated :)

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.