|04 Sep 2010||#1|
execute commands on power event
Is there some way to configure Windows 7 to execute commands (such as resolution changing, killing/starting processes and services, etc.) whenever the laptop switches from AC to DC and back? I have been using batterysaver from codeplex.com but it is still in beta and hasn't seen any updates for around 6 months. It is somewhat unreliable and I can't get it to trigger nircmd.exe to lower my resolution when I switch to battery or to raise it when I switch back.
I think my best bet would be Task Scheduler, but I don't know how to make a power event a trigger. Can anyone help?
|My System Specs|
|04 Sep 2010||#3|
Dell has a utility on the drivers download page that will turn off aero upon switching to battery, but they could have taken it to the extreme by making it also switch the screen resolution to something like 800x600 instead of the native 1280x800.
I have tried getting nircmd.exe to run through the batterysaver utility that I mentioned and switch the resolution, but I can't get it to work. nircmd.exe is a command line utility that among other things can change the screen resolution. Batterysaver can be configured to execute commands on battery switch (with varying degrees of success) but when I try to add arguments, it does work. I don't understand how they want me to put in the arguments.
My next step was to create a batch file that would run nircmd.exe with the arguments that I wanted, then compile it into an exe and then add it to the batterysaver profile. That also didn't work.
I saw that there is a conditions tab, but that will only tell the computer to stop executing something that was already running if it switches to battery power.
|My System Specs|
|Similar help and support threads for2: execute commands on power event|
|Batch Files - Create a Menu to Execute Commands||Tutorials|
|Start Command Prompt and automatically execute a few commands||Software|
|Execute copy-cut-paste commands via voice||Software|
|Event 1001 BugCheck Event 41 Kernel-Power Event 4 k57nd60a||BSOD Help and Support|
|BSODs after possible power failure - Kernel-Power Event ID:41||BSOD Help and Support|
|automatically execute commands when switching to DC||Performance & Maintenance|
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 11:35 AM.