Jump to content

How to perform system standby


xManh
 Share

Recommended Posts

:lmao:

;Standby like this

SetSuspend()

Func SetSuspend($mode=true,$force=true)

$result = DllCall("PowrProf.dll", "long", "SetSuspendState", "long",$mode, "long",$force, "long", false)

EndFunc

Not really necessary. All you need to do is this:

Shutdown(4+32);4 is to force it and 32 is to set it in standby(also known as suspend)

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Link to comment
Share on other sites

I'm sorry but but your all solutions don't work

Func SetSuspend($mode=true,$force=true)

$result = DllCall("PowrProf.dll", "long", "SetSuspendState", "long",$mode, "long",$force, "long", false)

EndFunc

This perform system hibernate which is different from standby

@The Kandie Man

Shutdown(4+32) does not make the computer standby too

Link to comment
Share on other sites

you must call the function first !

;Standby like this

SetSuspend()

Func SetSuspend($mode=true,$force=true)

$result = DllCall("PowrProf.dll", "long", "SetSuspendState", "long",$mode, "long",$force, "long", false)

EndFunc

for me (XP system) it works ! Compile it and start it

Edited by Micha1405
Link to comment
Share on other sites

I'm sorry but but your all solutions don't work

This perform system hibernate which is different from standby

@The Kandie Man

Shutdown(4+32) does not make the computer standby too

My apologies. Upon closer inspection i found that the function doesn't allow a forced suspend(aka standby). All you needed to do to fix the code remove the 4.

Shutdown(32)

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Link to comment
Share on other sites

@Micha1405

I have copied and compiled your code but It still hibernated. I'm using Xp sp2 too. May be there is wrong in the parameters?

@The Kandie Man

Shutdown(32)
works well, thank you very much
may be the settings @ power option are diffrent ?!? I use this on my notebook and it works ! Hibernate is deactivated on my Notebook Edited by Micha1405
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...