From 59ba82386511486f5cc9a03002acd1fbbbd903b2 Mon Sep 17 00:00:00 2001 From: Hamza Zakaria Date: Tue, 17 Mar 2026 14:30:49 +0100 Subject: [PATCH] Fixed install service bat file --- bin/install_ddnsupdater_service.bat | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/bin/install_ddnsupdater_service.bat b/bin/install_ddnsupdater_service.bat index f30611d..44b6c9f 100644 --- a/bin/install_ddnsupdater_service.bat +++ b/bin/install_ddnsupdater_service.bat @@ -1,12 +1,18 @@ @echo off -REM Check if a path parameter was provided -IF "%~1"=="" ( - echo Usage: install_ddns_service.bat ^ +REM Get the folder where this bat is located +SET SCRIPT_DIR=%~dp0 + +REM Define the service exe path (same folder as bat) +SET EXE_NAME=DDNSUpdater.exe +SET EXE_PATH=%SCRIPT_DIR%%EXE_NAME% + +REM Check if the exe exists +IF NOT EXIST "%EXE_PATH%" ( + echo ERROR: %EXE_NAME% not found in the same folder as this script. + pause exit /b 1 ) -SET EXE_PATH=%~1 - REM Create the service (auto-start) sc create DDNSUpdaterService binPath= "%EXE_PATH%" start= auto