mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2025-12-15 20:03:02 +00:00
28 lines
515 B
Batchfile
28 lines
515 B
Batchfile
::
|
|
:: generate service xml file
|
|
::
|
|
|
|
@echo off
|
|
pushd %~dp0
|
|
set MY_DIR=%~dp0
|
|
set MY_DIR=%MY_DIR:~0,-1%
|
|
|
|
for /f "delims=X" %%i in ('dir /b %MY_DIR%\netdisk-fast-download.jar') do (
|
|
set LAUNCH_JAR=%MY_DIR%\%%i
|
|
)
|
|
|
|
(for /f "delims=" %%a in (nfd-service-template.xml) do (
|
|
set "str=%%a"
|
|
setlocal enabledelayedexpansion
|
|
set "str=!str:${dd}=%MY_DIR%!"
|
|
set "str=!str:${jar}=%LAUNCH_JAR%!"
|
|
echo,!str!
|
|
endlocal
|
|
))>"nfd-service.xml"
|
|
|
|
|
|
sc delete netdisk-fast-download
|
|
nfd-service install
|
|
sc start netdisk-fast-download
|
|
pause
|