@echo off
setlocal

set SERVICE_NAME=XYZ Print Service

REM Check for admin privileges
net session >nul 2>&1
if %errorlevel% neq 0 (
  echo ERROR: This script must be run as Administrator
  exit /b 1
)

echo Starting "%SERVICE_NAME%"...
sc start "%SERVICE_NAME%"
if %errorlevel% neq 0 (
  echo ERROR: Failed to start service
  echo Service may not be installed. Run install-service.bat first.
  exit /b 1
)

timeout /t 2 /nobreak >nul
sc query "%SERVICE_NAME%"

endlocal
