@echo off

color 07

echo.
echo.
rem set path=C:\Windows\Microsoft.NET\Framework64\v4.0.30319;%path%

taskkill /F /IM nginx.exe

sc config ELinkService start= disabled
net stop ELinkService
timeout /T 3
sc delete  ELinkService
rem InstallUtil.exe /u ELinkService
if not errorlevel 0 goto fail

%~d0
cd %~dp0
echo %~dp0
rd /s/q "C:\Program Files\ELink"
rd /s/q C:\Users\Public\Documents\.elink
rd /s/q C:\Users\Public\Documents\.elink\log

if not errorlevel 0 goto fail

color 07
rem cls
echo.
echo.
echo *************************************
echo.
echo   UnInstall ELinkService Success
echo.
echo.
echo *************************************

pause
goto end
:fail
rem cls
color 4f
echo.
echo.
echo *************************************
echo.
echo    UnInstall ELinkService failed
echo.
echo *************************************
echo.
pause



:end
