ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

[REQ] Disable sleep/hibernation one time to drain battery

<< < (2/3) > >>

vevola:
cool! thanks!!

4wd:
No visual output.....I'm a bit of a lazy coder :D

However, you should get aural feedback.  When my machines are switched to High performance/Always On the CPU fan goes into high gear ;)

I'll look at providing some kind of output window at the end.

4wd:
Updated - now outputs to a window.

Run it once:


Run it again:


It will say Fail instead of Done if the powercfg.exe command failed, (and give the error), or the RunOnce registry entry couldn't be (re)set.

Unfortunately, it's not easy to determine how an AutoIt executable was launched, (CLI or Windows), so the output will always be to a window even if launched from the CLI.

I think that about covers it unless there's a problem - I might look at enabling/disabling Hibernate/Sleep from within the script, (to reduce reliance on powercfg.exe), but don't count on it.

skwire:
Nice work, 4wd.  :Thmbsup: vevola, please confirm this works for you and I'll mark and move this thread to Finished Programs. 

vevola:
Well, it seems to first hibernate, and then on wake up it works...

Also... should I be running it *twice*? I'm not sure I understand your earlier post with the two screenshots...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version