DDNSUpdater/bin/install_ddnsupdater_service.bat

18 lines
372 B
Batchfile

@echo off
REM Check if a path parameter was provided
IF "%~1"=="" (
echo Usage: install_ddns_service.bat ^<path_to_exe^>
exit /b 1
)
SET EXE_PATH=%~1
REM Create the service (auto-start)
sc create DDNSUpdaterService binPath= "%EXE_PATH%" start= auto
REM Start the service
sc start DDNSUpdaterService
echo Service DDNSUpdaterService installed and started.
pause