@echo off
chcp 936
echo  =============================================================== 
echo                         直播管理系统
echo                             卸载 
echo  =============================================================== 
color 0A
sc query liveserver | findstr liveserver >nul 2>nul
if not errorlevel 1 (goto exist) else goto notexist
:exist
rem 是否启动
net start | findstr /i "liveserver" >nul 2>nul
if not errorlevel 1 (net stop liveserver >nul)
server.exe uninstall
goto :end

:notexist
echo 服务未安装,按任意键退出
pause
exit
:end
echo 服务已经卸载
pause