@echo on
setlocal
net session >nul 2>&1
if %errorlevel% neq 0 (
  echo [ERROR] Must run as Administrator.
  pause
  exit /b 1
)

set SVC=SurfGuardDns

echo ================================================
echo   Uninstall SurfGuardDns Windows service
echo ================================================

echo Stopping service...
sc stop %SVC%

echo Deleting service...
sc delete %SVC%

echo.
echo Final state:
sc query %SVC%
echo.
echo ================================================
echo   Uninstalled. Remember to also run 3-reset-dns.bat
echo   to restore automatic DNS on your adapters.
echo ================================================
pause
