@echo off setlocal call %~dp0/setenv.bat echo Service Add... %~dp0/nssm install %NTRI_SERVICE_NAME% "%NTRI_APP_BIN_DIR%/startup.bat" %~dp0/nssm set %NTRI_SERVICE_NAME% AppDirectory %NTRI_APP_DIR% %~dp0/nssm set %NTRI_SERVICE_NAME% Description %NTRI_SERVICE_DESCRIPTION% %~dp0/nssm set %NTRI_SERVICE_NAME% AppStdin %NTRI_LOG_PATH%/stdin.log %~dp0/nssm set %NTRI_SERVICE_NAME% AppStdout %NTRI_LOG_PATH%/stdout.log %~dp0/nssm set %NTRI_SERVICE_NAME% AppStderr %NTRI_LOG_PATH%/stderr.log %~dp0/nssm set %NTRI_SERVICE_NAME% AppStdoutCreationDisposition 4 %~dp0/nssm set %NTRI_SERVICE_NAME% AppStderrCreationDisposition 4 %~dp0/nssm set %NTRI_SERVICE_NAME% AppRotateFiles 1 %~dp0/nssm set %NTRI_SERVICE_NAME% AppRotateOnline 1 %~dp0/nssm set %NTRI_SERVICE_NAME% AppRotateSeconds 2592000 %~dp0/nssm set %NTRI_SERVICE_NAME% AppRotateBytes 104857600 %~dp0/nssm set %NTRI_SERVICE_NAME% Start SERVICE_AUTO_START rem %~dp0/nssm start %NTRI_SERVICE_NAME% echo. pause