@echo off
echo Attempting to stop Clarity Monitoring Service
for /F "tokens=3 delims=: " %%H in ('sc query "Clarity Monitoring Service" ^| findstr "        STATE"') do (
  if /I "%%H" EQU "RUNNING" (
   net stop "Clarity Monitoring Service"
  )
)