jennico Posted July 9, 2007 Share Posted July 9, 2007 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\Heuristicswhose 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.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
/dev/null Posted July 9, 2007 Share Posted July 9, 2007 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\Power1=Hibernate ON0=Hibernate OFFYou can change that with powercfg /hibernate on/off. Don't know how to check the statuswith 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 * Link to comment Share on other sites More sharing options...
jennico Posted July 9, 2007 Author Share Posted July 9, 2007 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.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now