@echo off
REM ----------------------------------------------
echo Deleting firewall rules we added.
netsh advfirewall firewall delete rule name=NxProxy_68_in > NUL
REM -
REM ----------------------------------------------
set BPATH=%~dp0
cd %BPATH%
REM -
if not exist ..\conf\appname (
  echo [ERROR] No appname file.
  exit /b 1
)
set /p APPNAME=<..\conf\appname
REM -
REM ----------------------------------------------
cscript undns.vbs
net stop %APPNAME%
"%BPATH%nssm.exe" remove %APPNAME% confirm
