I know exactly where I want to lead this country.
- George W. Bush Campaign Ad
::   Blog  ::   Photos  ::   Europe  ::   Books  ::   Articles  ::   Links  ::   Friends  ::   Combo Feed  ::   Mobile  ::    
Submit a story!
Need Help?

Powered by FeedBlitz

Most Popular
Download This American Life Episodes
An Experiment in Porn
Fuck For Forest
Japan and Atomic Bomb Effects
Carnival Of The Green #18

Random Entries:
Ford CEO Lies About Bush Hydrogen Car
Immunity?
Photo Gallery
Gas prices "highest ever" ?
Geeky Gardening

World Food/Slow Food
Globalization of Food and Agriculture
NAIS? Ridiculous.
Jalapenos and Salmonella - Same Old Story?
The Effects of Globalization on Developing World Agricultural Systems
Industrial Agriculture and Vertical Integration
London Restaurants

Recent Comments:
Spongebob is Such a Homo!
Leash gal sex pics
The Consistency Of Inconsistency or "Hope and Change"
Search Terms
Geeky Gardening
george-at-dirtygreek.org george-at-dirtygreek.org

Twitter / DirtyGreek
Follow DirtyGreek on Twitter

My Photos
Gallery RSS
My Flickr Photos
Syndicate Me!
Dirty Greek - BatteryFace- Start/Stop Apps On Laptop Power On/Off
  Coding : BatteryFace- Start/Stop Apps On Laptop Power On/Off
You are NOT on the DirtyGreek.Org homepage. Please CLICK HERE to go there.

I wanted to be able to preserve power by killing / starting processes depending on whether my laptop is plugged in or not. It doesn't seem like that would be difficult to find, but I can't find it. So, I took a foray into visual basic and wrote it myself. Well, it's certainly a hack and a half, but I got what I basically want going. It seems pretty functional.

It also utilizes a program called "process" that I got here to terminate processes when you unplug, because I couldn't figure out an easy way to make vb do that. If anyone's an expert on that or finding out if a process is already running to see if it needs to be restarted (right now it just starts applications when you plug in whether they're already running or not), hit me up.

Anyway, if you want to check it out, here you go.

Just unzip all of those files into one place, put the programs you want to start on plug in into startprograms.txt, the process names you want to end when you unplug in endprograms.txt, the names of the services you want to start when you plug in into startservices.txt, and the names of the services you want to stop when you unplug into stopservices.txt, then run BatteryFace.exe and/or have windows start it up automatically.

Oh, and feedback is appreciated, but I don't need you to tell me it's a hack. I would love suggestions on the above mentioned points or any kind of cool ideas for features.

UPDATE: I've added a few features, including some little system tray options to disable and exit, and the ability to start and stop windows services as well as programs.

UPDATE 7/19/2007: I've added more new features, such as the ability to disable during certain times of the day. Also made some visual tweaks.

UPDATE 2/9/2008: I've fixed some problems that basically made this software unusable unless you installed it exactly the way I did. I didn't test well last time... I've also added the ability to add and remove programs and services from the app itself and set the power check cycle time, so that you can tell it not to shut down and restart software if you're just, for example, moving the laptop to another room.

You can also now add and remove programs and services from within the program, by manually entering or choosing them from lists. Also made some more visual tweaks, such as moving the status information to a separate location and making it accessible with a link at the bottom.

Important: Remember to put "quotes" around any file paths or service names that have spaces.


Posted By George on 07/16/2007 @ 10:01 AM | Link and Discuss (0) | More Coding software hacking visualbasic vb programming windows laptop power batteryapp batteryface battery
Share And Enjoy: Post To Del.icio.us Post To Socialposter.com Post To Digg Post To Reddit Post To Technorati Post To Blinklist Post To Stumbleupon Post To Twitter Post To Google Bookmarks Post To NewsVine Post To Microsoft Live Email To A Friend

My Related Posts: More on Haiti // Blogathon Post 3 - Chat With The Blogathoners! // RSS, Email, and Site Word Analysis // More On Abstinence-Only Education // Zimbardo on Abu Ghraib //
No Comments
Name
Email
Subject
  Security Image
 
Comment