Add startInteractiveService.bat, uninstallService.bat

This commit is contained in:
Namhyeon Go 2024-07-30 18:17:26 +09:00
parent 172a5109e9
commit 6297f9689d
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,13 @@
REM startInteractiveService.bat
REM WelsonJS 0.2.7
REM https://github.com/gnh1201/welsonjs
@echo off
REM Get the current directory
set CURRENT_DIR=%~dp0
set CURRENT_DIR=%CURRENT_DIR:~0,-1%
REM Set the paths
set EXE_PATH=%CURRENT_DIR%\bin\x86\WelsonJS.Service.exe
"%EXE_PATH%" --working-directory=%CURRENT_DIR% --script-name=defaultService

22
uninstallService.bat Normal file
View File

@ -0,0 +1,22 @@
REM uninstallService.bat
REM WelsonJS 0.2.7
REM https://github.com/gnh1201/welsonjs
@echo off
REM Set the service name
set SERVICE_NAME=WelsonJS.Service
REM Get the current directory
set CURRENT_DIR=%~dp0
set CURRENT_DIR=%CURRENT_DIR:~0,-1%
REM Set the paths
set EXE_PATH=%CURRENT_DIR%\bin\x86\WelsonJS.Service.exe
set INSTALL_UTIL_PATH=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe
REM Uninstall the service
sc stop "%SERVICE_NAME%"
"%INSTALL_UTIL_PATH%" /u "%EXE_PATH%"
echo Service "%SERVICE_NAME%" removed.
pause