Create directory before nssm download

This commit is contained in:
2025-01-20 10:49:29 +01:00
parent 43a65926fe
commit 0ecaefeb10

View File

@@ -21,6 +21,9 @@ set BESZELKEYPREFIX=%1
set BESZELKEY=%2
call env.cmd
echo Creating directory %DESTINATIONDIR%
md "%DESTINATIONDIR%" >nul 2>&1
where nssm.exe >nul 2>&1
if %errorlevel% NEQ 0 goto installnssm
goto proceed
@@ -38,9 +41,6 @@ del "%TEMP%\nssm-2.24.zip" >nul 2>&1
rd /s/q .\nssm-2.24 >nul 2>&1
:proceed
echo Creating directory %DESTINATIONDIR%
md "%DESTINATIONDIR%" >nul 2>&1
echo Copying agent.exe to %DESTINATIONDIR%
copy .\agent.exe "%DESTINATIONDIR%\" >nul 2>&1
@@ -62,10 +62,9 @@ if %errorlevel% NEQ 0 (
)
echo Starting %SERVICENAME%
%NSSMEXE% start %SERVICENAME% >nul 2>&1
%NSSMEXE% start %SERVICENAME%
if %errorlevel% NEQ 0 (
echo Failed to start service.
goto end
echo Check output above.
)
echo Dumping service state