@echo off
set bstat=
for /f "tokens=2 delims==" %%a in ('wmic path Win32_Battery get BatteryStatus /value ^| find "="') do set bstat=%%a
if [%bstat%]==[1] echo The battery is discharging.
if [%bstat%]==[2] echo The system has access to AC so no battery is being discharged. However, the battery is not necessarily charging.
if [%bstat%]==[3] echo Battery fully charged.
if [%bstat%]==[4] echo Battery low.
if [%bstat%]==[5] echo Battery critical.
if [%bstat%]==[6] echo Battery charging.
if [%bstat%]==[7] echo Battery charging and high.
if [%bstat%]==[8] echo Battery charging and low.
if [%bstat%]==[9] echo Battery charging and critical.
if [%bstat%]==[10] echo Battery status undefined.
if [%bstat%]==[11] echo Battery partially charged.
O arquivo de lote acima usa a classe WMI Win32_Battery para obter o status da bateria. Estenda-o para executar as ações necessárias e, em seguida, use o agendador de tarefas para executá-lo como e quando necessário.