@echo off

taskkill /F /IM AnmpManager.exe >nul 2>nul


call :remove_apache
call :remove_nginx
call :remove_mysql
call :remove_memcached
call :remove_allphp

goto :end


:remove_apache
    echo. && echo. && echo.
    echo --------------------------------------------------
    echo Remove AnmpApacheServer
    net stop  AnmpApacheServer
    sc delete AnmpApacheServer
goto :eof


:remove_nginx
    echo. && echo. && echo.
    echo --------------------------------------------------
    echo Remove AnmpNginxServer
    net stop  AnmpNginxServer
    sc delete AnmpNginxServer
goto :eof

:remove_mysql
    echo. && echo. && echo.
    echo --------------------------------------------------
    echo Remove AnmpMysqldServer
    net stop  AnmpMysqldServer
    sc delete AnmpMysqldServer
goto :eof

:remove_memcached
    echo. && echo. && echo.
    echo --------------------------------------------------
    echo Remove AnmpMemcachedServer
    net stop  AnmpMemcachedServer
    sc delete AnmpMemcachedServer
goto :eof

:remove_allphp
    echo. && echo. && echo.
    echo --------------------------------------------------
    echo Remove AnmpNginxServerPHP5x
    for %%a in (2 3 4 5 6) do (
        echo.
        net stop  AnmpNginxServerPHP5%%a
        sc delete AnmpNginxServerPHP5%%a
    )
goto :eof



:end
    pause