Project Description

PowerFool – A Power Tool & Device Checker

Indicates the OEM’s preferred power management profile. These values are read from the Preferred_PM_Profile field of the Fixed ACPI Description Table (FADT). These values are returned by the PowerDeterminePlatformRole or PowerDeterminePlatformRoleEx function.

When researching some troubles we had with BranchCache in WinPE we needed to mimic the Battery detection system available in BranchCache. So this tool was born. We found the issue in BranchCache and it wasn’t related to the Power detection. We proved that with this nifty little tool. Should run on most platforms (including WinPE) as long as the Visaul C++ runtime for 2012 is installed.

Other usage can be to find out the estimated battery life before kicking of a job, detecting power cable plugged in, detecting Slates and tablet devices.

What does the tool return, well quite a bit of info:

Power Platform Role – What kinda HW are we on?
Possible Return Values:
Unspecified – The OEM did not specify a specific role.
Desktop – The OEM specified a desktop role.
Mobile – The OEM specified a mobile role (for example, a laptop).
Workstation – The OEM specified a workstation role.
EnterpriseServer – The OEM specified an enterprise server role.
SOHOServer – The OEM specified a single office/home office (SOHO) server.
AppliancePC – The OEM specified an appliance PC role.
PerformanceServer – The OEM specified a performance server role.
Slate – The OEM specified a tablet form factor role.
Maximum – Values equal to or greater than this value indicate error

PowerStatus – ACLineStatus
The AC power status.This member can be one of the following values:
Value Meaning
0 Offline
1 Online
255 Unknown status

The percentage of full battery charge remaining. This member can be a value in the range 0 to 100, or 255 if status is unknown.

The number of seconds of battery life remaining, or -1 if remaining seconds are unknown.

The number of seconds of battery life when at full charge, or -1 if full battery lifetime is unknown.

The battery charge status – BatteryFlag
The battery charge status.This can contain one or more of the following flags:
Value Meaning
0 The value is zero if the battery is not being charged and the battery capacity is between low and high.
1 High – the battery capacity is at more than 66 percent
2 Low – the battery capacity is at less than 33 percent
4 Critical – the battery capacity is at less than five percent
8 Charging
128 No system battery
255 Unknown status – unable to read the battery flag information

Last rows shows a verbal summary of the values above.

Thats it folks!


Get PowerFool