Access BatteryData via SMBus lazarus / 34-Windows ---------------------------------------------------------------------- metis · 2016-10-20 14:44 Hi to all ! I have a laptop, where the battery is not charging any more.  Obviously there's nothing wrong physically with that battery, only BatteryData seem to be messed up by an erroneous Win7-Version, as described here: "Akku-Tod durch Windows 7 ???" http://thinkpad-forum.de/threads/83254-Akku-Tod-durch- Windows-7?highlight=Akku-Tod "T400 Akku selber reparieren" https://thinkpad-forum.de/threads/185183-T400-Akku-selber-reparieren (Sorry, but that's all in German.)  Now, I'm looking for a solution to read out all BatteryData and correct invalid Entries, with the battery plugged in, that is without the need to buy lots of equipment or disassemble the battery, as shown here: http://be2works.com/ This solution should be able to reset flags, like the 'Permanent Failure Flag', too. -> Does anybody know, how to do it under Windows (32bit) and/or in the BIOS  ? BTW: Getting the batterie's 'ChargingState' and 'Lifetime left' in Windows is already shown here: http://forum.lazarus.freepascal.org/index.php/topic,16734.msg91289.htm l#msg91289 -> What else can be read out with the Window-API's 'GetSystemPowerStatus()' ? Thanks ! ---------------------------------------------------------------------- RAW · 2016-10-22 02:45 There is a free version of "BATTERY BAR"... it's a nice program and shows a lot of information... maybe interesting for some extra information from another program... Maybe you can expand this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Procedure TForm1.GetBatteryInfo;  Var   SystemPowerStatus: TSystemPowerStatus; Begin  GetSystemPowerStatus(SystemPowerStatus);   With SystemPowerStatus   Do    Begin     Case ACLineStatus     Of    0:   Label1.Caption:= 'BATTERY';      1:   Label1.Caption:= 'AC';    Else Label1.Caption:= 'UNKNOWN';     End;      Case BatteryFlag     Of        1 : Label2.Caption:= 'HIGH';        2 : Label2.Caption:= 'LOW';        4 : Label2.Caption:= 'CRITICAL';        8 : Label2.Caption:= 'LOADING';      128 : Label2.Caption:= 'NO BATTERY';      255 : Label2.Caption:= 'UNKNOWN';     End;      If BatteryLifePercent <> 255     Then Label3.Caption:= 'PERCENT: '+IntToStr(BatteryLifePercent)     Else Label3.Caption:= 'PERCENT: UNKNOWN';    End; End; ---------------------------------------------------------------------- metis · 2016-10-27 13:50 @SoE I'll try that out - Thanks !