You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
1.5 KiB
Batchfile

echo off
set INPUT=%1
set UBISERVICE_DIR=C:\webapps\myapp\UbiService
set BATPATH=%UBISERVICE_DIR%\bin\ubiservice.bat
set NSSM=%UBISERVICE_DIR%\bin\nssm64.exe
if "%INPUT%" == "" (
echo ----------------------------------------
echo ex : svcregist.bat [install] [uninstall]
echo ----------------------------------------
echo.
) else (
if "%INPUT%" == "install" (
echo ----------------------------------------
echo UbiService Registration Job
echo ----------------------------------------
echo.
echo [UbiService Regist]
%NSSM% install UbiService %BATPATH%
echo.
echo [UbiService Set Description]
%NSSM% set UbiService Description "UbiService for UbiReport4.0"
echo.
echo [UbiService Start]
%NSSM% start UbiService
echo.
echo ----------------------------------------
echo Install Completed
echo ----------------------------------------
echo.
) else (
if "%INPUT%" == "uninstall" (
echo ----------------------------------------
echo UbiService UnRegistration Job
echo ----------------------------------------
echo.
echo [UbiService Stop]
%NSSM% stop UbiService
echo.
echo [UbiService Unregist]
%NSSM% remove UbiService confirm
echo.
echo ----------------------------------------
echo Uninstall Completed
echo ----------------------------------------
echo.
) else (
echo ----------------------------------------
echo ex : svcregist.bat [install] [uninstall]
echo ----------------------------------------
echo.
)
)
)