How do I get battery information in windows?

后端 未结 4 1172
清酒与你
清酒与你 2021-01-02 10:57

I have two laptops here. One is running Vista, the other Windows 7. I need to get the specifications on the batteries in both, how do I go about that?

The reason I\

4条回答
  •  孤城傲影
    2021-01-02 11:31

    You could use WMI and the Win32_Battery class. It has a property called Chemistry that has this information.

    UPDATE:

    Actually, there is also Win32_PortableBattery, which would be more appropriate for a laptop battery. They both inherit from the CIM_Battery class.

提交回复
热议问题