Jump to content
CCleaner Community Forums
Neiltoo

auto to sleep rather than shut down

Recommended Posts

Is there a command line parameter that will put windows to sleep rather than shut down. I had hoped that

Quote
Quote

start CCleaner.exe /AUTO /psshutdown -d -t 0

 

would work but no luck.

Share this post


Link to post
Share on other sites

I don't think there's a way to do that currently.  But it's a good suggestion.

Share this post


Link to post
Share on other sites

Thanks for the quick reply. It would certainly be handy for me.

Share this post


Link to post
Share on other sites
1 hour ago, APMichael said:

You could create a batch file like the following and name it "ccsleep.bat" for example:


@ECHO OFF
START "CCleaner" /WAIT "%ProgramFiles%\CCleaner\CCleaner64.exe" /AUTO
"<path_to_psshutdown>\PSSHUTDOWN.EXE" -d -t 0

 

PsShutdown can be downloaded here: https://docs.microsoft.com/en-gb/sysinternals/downloads/psshutdown

Does that wait for ccleaner to finish before psshutdown?

Share this post


Link to post
Share on other sites
16 hours ago, Nergal said:

Does that wait for ccleaner to finish before psshutdown?

 

Yes, "/WAIT" instructs "START" to do this.

Syntax:
START "title" [/D path] [options] "command" [parameters]

Options:
/W or /WAIT - Start application and wait for it to terminate.

 

Share this post


Link to post
Share on other sites
On 16/05/2020 at 16:12, APMichael said:

You could create a batch file like the following and name it "ccsleep.bat" for example:


@ECHO OFF
START "CCleaner" /WAIT "%ProgramFiles%\CCleaner\CCleaner64.exe" /AUTO
"<path_to_psshutdown>\PSSHUTDOWN.EXE" -d -t 0

 

PsShutdown can be downloaded here: https://docs.microsoft.com/en-gb/sysinternals/downloads/psshutdown

 

Excellent! Thanks for the help

 

Share this post


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