|
Post by cmolstad on Feb 26, 2018 17:05:05 GMT
It would be great if you could have the pre-flight check show how charged the battery is. The reason I say this is because some of the BIOS updaters will only update the BIOS if the battery is charged to at least a certain %, even if it's plugged into AC power. I haven't looked yet to see if there is any way to do this through WMI though.
|
|
|
Post by disansk on Feb 27, 2018 7:25:01 GMT
It's worked for me:
<Action Type="WMIRead" Variable="BatteryPerc" Namespace="root\cimv2" Class="Win32_Battery" Property="EstimatedChargeRemaining"/> ... <Action Type="Preflight" Title="HW Check" ShowBack="True">
... <Check Text="Battery charge > 10%" CheckCondition='%BatteryPerc% >= 10' />
... </Action>
|
|
|
Post by cmolstad on Feb 27, 2018 12:56:07 GMT
It's worked for me: <Action Type="WMIRead" Variable="BatteryPerc" Namespace="root\cimv2" Class="Win32_Battery" Property="EstimatedChargeRemaining"/> ... <Action Type="Preflight" Title="HW Check" ShowBack="True">
... <Check Text="Battery charge > 10%" CheckCondition='%BatteryPerc% >= 10' />
... </Action> Nice find! I'll test it out.
|
|
|
Post by cmolstad on Feb 27, 2018 19:20:20 GMT
There a way we can allow it to continue on even if it fails that check?
|
|
|
Post by disansk on Feb 28, 2018 3:38:20 GMT
There a way we can allow it to continue on even if it fails that check? With preflight you can't. Try to use Info action with condition: <Action Type="Info" Name="BattInfo" Title="Low battery" Condition='%BatteryPerc% <= 25'>
<![CDATA[<b>Warning! Battery charge less then 25%</b>]]>
</Action>
|
|
|
Post by Jason on Mar 17, 2018 20:43:50 GMT
Note that preflight warnings are on my to-do list.
|
|