How do I know my computer's not hibernating anymore?
December 5, 2007 10:12 AM
Subscribe
I'm running XP SP2, and I'd like to setup my laptop to do a couple of things once it comes out of hibernation. Pretty much everything I want to do is scriptable, but I have no idea how to trigger the scripts.
For example, I'd like to test if the power cord is plugged in. If it is, use the powercfg utility to switch the power mode to "Desktop". If, however, I come out of hibernation and the cord isn't plugged in, switch to "Power Saver" mode. Scripting these changes are easy, but how do I find out:
a) If the machine's just come up from hibernation
b) If the power cord is plugged in
c) If I've got a monitor on the external port.
This comes about because whatever state the machine was in when I last put it into hibernation is the state it's in when it comes out. The main problem stems from my using it as a desktop when not on the road. If I hibernate while on the road, and the plug it all up at home, I have to go through a hassle to get it to use the monitor as the primary screen instead of the laptop's screen. It would be much nicer if the machine itself just said "oh, I'm at home, let me setup the monitor and power scheme" (and connect to the VPN, and do this, and do that...etc)
I had found a little utility that would launch applications based on power changes (such as waking up), but I can't find it again. I can survive with just that as I can use the monitor change utility as a basis for doing other things.
posted by Spoonman to computers & internet (6 comments total)
2 users marked this as a favorite
I've never done it, but this should get you headed in the right direction. I think.
posted by jeffamaphone at 10:22 AM on December 5, 2007