Sign in to follow this  
Followers 0
jennico

how to detect hibernate ?

3 posts in this topic

hj there,

i need to know how to detect if the hibernate mode is turned on or not.

the reason is that i want to end my program in different ways depending on the shutdown mode.

i found one hint in the forum:

I did a registry scan before and after I changed the "hibernate" setting and I found that the only thing that changed was:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power\Heuristics

whose value changed as shown:

05 00 00 00 00 01 01 00 ...

05 00 00 00 00 01 00 00 ...

but on my computer there are completely different values.

so does anyone know where this information is saved ?

j.


Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Share this post


Link to post
Share on other sites



but on my computer there are completely different values.

What are those values?

The only interesting part is byte nr. 7 of

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Power

1=Hibernate ON

0=Hibernate OFF

You can change that with powercfg /hibernate on/off. Don't know how to check the status

with powercfg.

so does anyone know where this information is saved ?

Should be in the 7th byte of the registry key you mentioned.


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

thank you very much !

i tested it, you're right. the 7th byte 00=hib off 01=hib on.

i was confused because all the other bytes changed from machine to machine, but the 7th byte is the right one, the others don't matter.

thx again

j.


Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

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
Sign in to follow this  
Followers 0