locked
Low/Critical battery action (running a script) RRS feed

  • Question

  • This question has been asked before but never answered.  How do I configure Windows 7 to run a program/batch file when the computer is switched to battery power or reaches the critical threshold?  It was very easy in XP, but the functionality appears to have been removed.

    I have my PC plugged into a UPS, and need to receive an email notification if there is a power outage, and when the battery is critically low I want to get another email and have the computer hibernate.  I suspect that this could be possible using the complicated-looking Event triggers, but I can't afford hours and hours of frustrating trial and error.

    Please help.  Was the functionality removed, as I suspect, or is it just hidden somewhere?

    Thank you.
    Saturday, January 9, 2010 8:17 AM

All replies

  • Speebs,

    I'm moving your post to the Windows 7 forums in the TechNet community. They'll be able to better assist you there.

    Thanks for using Microsoft Answers!
    Cody C
    Microsoft Answers Support Engineer
    Visit our Microsoft Answers Feedback Forum and let us know what you think.
    Sunday, January 10, 2010 5:10 AM
  • Hi,

    How had it been done when in windows xp? Did you use a third party program or a batch file?

    What is the trigger to tract the power change? eventlog? schedualed task? If Powercfg.exe and registry was involved, the following webistes could be of help:

    http://support.microsoft.com/kb/935799

    Did you encounter issues when writting a script or schedualing a task in windows? Is there any error message?
    Tuesday, January 12, 2010 5:26 AM
  • Basically, there are two ways you can monitor the battery - using the ACPI event mechanism or using a cron job. If you are using the ACPI mechanism and you were using a script in windows xp, you might need to update your chipset driver especially the ACPI driver to check the result. I would also recommend installing the  Graphics driver from the optional Windows updates as it does install some additional files used by theACPI driver.
    Friday, January 15, 2010 2:59 AM
  • Hi,

    I also want to know how to play a program when critical battery.

    In windows XP there is a PLAY A PROGRAM option in the battery manager, but not on Wiindows 7 !

    Please help !

    Thanks.
    Wednesday, February 3, 2010 7:27 AM
  • Looking for this too.  Tell me windows 7 doesn't suck.

    XP can do it...
    http://www.raymond.cc/blog/archives/2007/11/01/how-to-use-one-ups-on-multiple-computers/


    Saturday, February 6, 2010 5:54 AM
  • Searching and searching for an answer to this and yet another thread with no response.

    MS, this is pathetic, both the removal of this useful option from Vista & 7, and your total lack of assistance to anyone who dares to enquire about it.


    Toby
    Tuesday, June 22, 2010 9:59 PM
  • +1. This is just so basic.

    To add insult to injury, the software for APC and TrippLite are just as bad, they don't let you run a script when the power is low.

    • Proposed as answer by alive10 Friday, December 28, 2012 8:50 PM
    • Unproposed as answer by alive10 Friday, December 28, 2012 8:50 PM
    Friday, December 3, 2010 11:38 PM
  • Need this too, vitally.... It's 2012 and still no solution?
    Friday, December 28, 2012 8:52 PM
  • Need this for an APC too... still no proper solution in 2016.
    Friday, May 20, 2016 1:03 PM