Sunday, January 11, 2009

PowerFailureDetector.exe

This little application can detect when you get a power failure (and thus you are now running on your UPS). For it to do that, you guessed it, there are a couple of prerequisites:
  1. You need to have a UPS (obviously)
  2. You need to have a network card to which is plugged a cable connection that gets disconnected when the power is off. In other words you might need a hub, or maybe a modem that gets turned off when you lose power. Also this means that this hub/switch/modem should not be running on backup power.
    I did not test this with wireless connections, but I am guessing wireless connections could cause the application to mistakenly think that you have a power failure when a wireless connection is lost.
  3. .NET Framework 2.0 or above
Cannot think of anything else, I guess that should do it. Now how it works. When your connection gets disconnected (one way or another, you might remove the LAN cable yourself) and that goes for any network connection (to be on the safe side if you have more than one connection), if this application is running, it will detect that and act accordingly giving you a couple of options. The easiest way to figure this application out is to test it, worst case scenario your machine gets hibernated

Application is written in C#, and I will provide source code if needed, enjoy and give me feedback.
Here is the link: Download.

kick it on DotNetKicks.com

0 comments:

Post a Comment