Use nssm instead of sc

This commit is contained in:
Hamza committed 2026-03-17 15:07:24 +01:00
1 parent 59ba823865
commit d05ba5cc55
5 files changed
+56 -11

No files matched your search

+19 -3
View File
@@ -1,5 +1,21 @@
@echo off
sc stop DDNSUpdaterService
sc delete DDNSUpdaterService
echo Service DDNSUpdaterService stopped and deleted.
REM ===============================
REM DDNS Updater Uninstall using NSSM
REM ===============================
SET SCRIPT_DIR=%~dp0
SET NSSM_PATH=%SCRIPT_DIR%nssm.exe
IF NOT EXIST "%NSSM_PATH%" (
echo ERROR: nssm.exe not found in the same folder as this script.
pause
exit /b 1
)
REM Stop and remove the service
"%NSSM_PATH%" stop DDNSUpdaterService
"%NSSM_PATH%" remove DDNSUpdaterService confirm
echo.
echo DDNSUpdaterService uninstalled successfully!
pause