Page 1 of 1

Program to check power source (Batt. or A/C) of a laptop

PostPosted: Nov 13, 2005 @ 1:20am
by James S

PostPosted: Nov 14, 2005 @ 3:13pm
by Dan East
I don't know how to produce .com (and it seems that info is hard to find now, having to weed through all the COM documentation), so here's an EXE.

The return codes are as follows:
0 to 100: On AC Power, n is the battery percentage remaining
-100 to -1: On DC Power, abs(n) is the battery percentage remaining
-900, -901: Error determining power status

I can see about making it into a com executable if I had some documentation on it.

It will also output to stdio the current power source and battery percentage, so it can be used by itself.

Dan East

PostPosted: Nov 14, 2005 @ 6:54pm
by James S