@echo off

set SERVER=SyncAppServer.exe

call :KillProcess %SERVER%

goto :eof

:KillProcess
set name=%1%
tasklist|find /i "%name%"
if %errorlevel%==0 (
	echo "%name% is exist....."
	taskkill /f /t /im %name%

	tasklist|find /i "%name%"
    if %errorlevel%==0 (
        echo "Failed to kill %name%"
    ) else (
        echo "Suc to kill %name%"
    )
) else (
    echo "%name% not exist"
)