22 lines
377 B
Batchfile
22 lines
377 B
Batchfile
|
%~d0
|
||
|
@echo off
|
||
|
cd %~dp0
|
||
|
::读取版本配置文件
|
||
|
set configVersion=serviceName.txt
|
||
|
for /f "tokens=1,2 delims=:" %%a IN (%configVersion%) Do (
|
||
|
set tag1=%%a
|
||
|
set tag2=%%b
|
||
|
)
|
||
|
set serviceName=%tag2%
|
||
|
echo %tag1%=%serviceName%
|
||
|
|
||
|
if %serviceName% == "" (
|
||
|
echo serviceName is error
|
||
|
pause
|
||
|
exit
|
||
|
)
|
||
|
|
||
|
nssm stop %serviceName%
|
||
|
nssm remove %serviceName% confirm
|
||
|
|
||
|
pause
|