I'm trying to determine if a laptop is connected to AC power.
The OS Im running under is WinPE. My app is written in native C++.
WMI queries using Win32_Battery are not supported and the GetSystemPowerStatus API always returns '1' for ACLineStatus (running on AC power or not).
Any ideas?
Additonal investigation: Just tried the API 'CallNtPowerInformation' with POWER_INFORMATION_LEVEL::SystemBatteryState. The SYSTEM_BATTERY_STATUS structure element AcOnLine also returns 1 regardless of power supply status. Probably just calls the same system level code but thought I'd add it in here.