@echo off
setlocal

:: Ensure running as admin
net session >nul 2>&1
if %errorLevel% neq 0 (
    echo Requesting administrative privileges...
    powershell -Command "Start-Process '%~f0' -Verb RunAs"
    exit /b
)

set SERVICE_NAME=SalesSummaryWorker

sc.exe stop %SERVICE_NAME%
timeout /t 2 >nul
sc.exe delete %SERVICE_NAME%

echo Service removed.
pause