@echo off
:: --- Check for Administrator privileges ---
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    powershell -Command "Start-Process '%~f0' -Verb RunAs"
    exit /b
)

title Close Server
echo Running close server script ...
timeout 1 >nul /NOBREAK

echo [--------------------------------------------( Closing WorldServer.exe    )--------------------------------------------]
taskkill /F /IM "WorldServer.exe"
timeout 1 >nul /NOBREAK

echo [--------------------------------------------( Closing GameServer.exe     )--------------------------------------------]
taskkill /F /IM "GameServer.exe"
timeout 1 >nul /NOBREAK

echo [--------------------------------------------( Closing ChattingServer.exe )--------------------------------------------]
taskkill /F /IM "ChattingServer.exe"
timeout 1 >nul /NOBREAK

echo [--------------------------------------------( Closing FrontServer.exe    )--------------------------------------------]
taskkill /F /IM "FrontServer.exe"
timeout 1 >nul /NOBREAK

echo [--------------------------------------------( Closing GatewayServer.exe  )--------------------------------------------]
taskkill /F /IM "GatewayServer.exe"
