Jump to content
CCleaner Community Forums
egnm1969

Adding "Hibernate" Option to CCleaner

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

It should be an easy feature to add.

 

 

XP + Vista (maybe earlier aswell):

rundll32.exe powrprof.dll,SetSuspendState Hibernate

 

Vista Only:

shutdown /h

Share this post


Link to post
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:

Share this post


Link to post
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

Share this post


Link to post
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 :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...