@echo off
SET SERVICE_NAME=ServidorBoletas
SET INSTALL_DIR=C:\ServidorBoletas
SET NSSM_EXE=%INSTALL_DIR%\nssm.exe
SET PORT=5001

:: Detener y eliminar el servicio
"%NSSM_EXE%" stop %SERVICE_NAME%
"%NSSM_EXE%" remove %SERVICE_NAME% confirm

:: Eliminar regla de firewall
netsh advfirewall firewall delete rule name="ServidorBoletasPuerto%PORT%"

echo 🗑️ Servicio y regla de firewall eliminados correctamente.
pause
