Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Run Script on Battery/Critical Power

06 Feb 2010   #1
Speebs

Windows 7 64
 
 
Run Script on Battery/Critical Power

Hi all,

In XP, we had the option of executing a script when the computer switched from AC to battery power, and also when the battery reached a critical level. This was extremely useful because I had a special script run to send an email that the power had gone out and then hibernate the computer when it reached a critical level.

In the Windows 7 power options screens, I see no such options. Were they removed? If so, wtf?

Thanks in advance.


My System SpecsSystem Spec
.

06 Feb 2010   #2
Jacee
Microsoft MVP

Windows 7 Ultimate 32bit SP1
 
 

My System SpecsSystem Spec
06 Feb 2010   #3
Speebs

Windows 7 64
 
 

Thanks. It doesn't really help me directly, except to imply that MS did in fact remove this functionality and the only solution is to develop a script that does what XP used to be able to do. Is that what you're telling me?

I guess I am going to have to write my own service to monitor the power state and perform an action when the state changes. Jeez.
My System SpecsSystem Spec
.


06 Feb 2010   #4
TaraSWinTeam

Windows 7
 
 

Here is a resource for setting up a power plan: Power plans: frequently asked questions.

Tara
Windows Outreach Team
My System SpecsSystem Spec
06 Feb 2010   #5
Speebs

Windows 7 64
 
 

Quote   Quote: Originally Posted by TaraSWinTeam View Post
Here is a resource for setting up a power plan: Power plans: frequently asked questions.

Tara
Windows Outreach Team

That tells me nothing... did you even read my question?
My System SpecsSystem Spec
12 Feb 2010   #6
Speebs

Windows 7 64
 
 

I ended up just writing a quick-and-dirty service in VB.NET to do this. If anyone is interested in testing it, let me know. Thanks for nothing MS, for disabling a very useful feature.
My System SpecsSystem Spec
22 Dec 2011   #7
kensiko

Win7 64 bits FR
 
 

We would need it at work Speebs, I hope you will see my post.
My System SpecsSystem Spec
Reply

 Run Script on Battery/Critical Power




Thread Tools





Similar help and support threads
Thread Forum
Customised alert sound for critical battery will not stop
I have set a customised alert sound for my Windows 8 laptop's Critical Battery alert but when I plug the charger in the sound keeps going. Is there a way I can have the sound play until the charger is plugged in and for it to then stop?
Sound & Audio
Disable Critical Battery Notification
Hello, is it possible to turn off the notification that pops up when battery level is critical (~7%) ?. "Change advanced power settings" only lets me disable the notification for low battery (~10%). The reason is that I got the program Battery Bar installed and let rather Battery Bar handle...
Performance & Maintenance
Disable automatic suspend on critical battery level
When my laptop is on critical battery level it suspends automatically. How do I avoid that? I want it to run until the battery is completely empty. Yes, I know I may lose data and damage the laptop; I do not care. I know the answer is somewhere around the POWERCFG utility but that thing is way...
Performance & Maintenance
suddenly don't get low or critical battery warnings on laptop..
Have power management set to warn of critical and low battery, used to warn fine.. Stopped warning, now just shuts down.. Any ideas how I can restore warnings? Also, having problems when I plug in set so display brightness should go to 100%, sometimes I have to plug/replug cause it stays dim...
Performance & Maintenance
Not Shutting Down Properly At Critical Battery
When my laptops battery reaches critical it will usually hibernate as all of them do. When it's switched back on it'll give you the option to do a system resume. The past 3 times it hasn't though, it has brought up the black screen saying windows didn't shut down properly, and giving me the options...
Performance & Maintenance
critical battery sound volume level?
i have critical battery sound set on my laptop to turn on at 10% and then 7% and shut the computer down at 5% if i do not do anything about it. problem is, sometimes i have the volume real low or off and dont hear it. is it possible (in windows, not an external program, although i will look to...
Sound & Audio

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 02:54.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App