59 lines
1021 B
Batchfile
59 lines
1021 B
Batchfile
|
@echo off
|
|||
|
setlocal EnableDelayedExpansion
|
|||
|
cd /d %~dp0
|
|||
|
|
|||
|
net.exe session 1>NUL 2>NUL && (
|
|||
|
goto as_admin
|
|||
|
) || (
|
|||
|
goto not_admin
|
|||
|
)
|
|||
|
|
|||
|
:as_admin
|
|||
|
::<3A><>ȡ<EFBFBD>汾<EFBFBD><E6B1BE><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
|||
|
set configVersion=version.txt
|
|||
|
for /f "tokens=1,2,3 delims=." %%a IN (%configVersion%) Do (
|
|||
|
set tag1=%%a
|
|||
|
set tag2=%%b
|
|||
|
set tag3=%%c
|
|||
|
)
|
|||
|
set /a tag3=1+%tag3%
|
|||
|
set oldVersion=%tag1%.%tag2%.%tag3%
|
|||
|
|
|||
|
::<3A>滻
|
|||
|
set d=%date: =0%
|
|||
|
set t=%time: =0%
|
|||
|
|
|||
|
set productname=%oldVersion%.%d:~2,2%%d:~5,2%%d:~8,2%%t:~0,2%%t:~3,2%%t:~6,2%
|
|||
|
echo %productname%
|
|||
|
echo %productname%> version.txt
|
|||
|
del /q *.panda
|
|||
|
echo .>%oldVersion%.panda
|
|||
|
|
|||
|
cd ..
|
|||
|
del /q *.panda
|
|||
|
echo .>%oldVersion%.panda
|
|||
|
|
|||
|
cd 2.database
|
|||
|
del /q *.panda
|
|||
|
echo >v%oldVersion%.panda
|
|||
|
|
|||
|
if not exist v%oldVersion% md v%oldVersion%
|
|||
|
cd v%oldVersion%
|
|||
|
if not exist <20>ű<EFBFBD><C5B1>ļ<EFBFBD>.txt echo -- <20><><EFBFBD>ݿ<EFBFBD><DDBF>ű<EFBFBD>(%productname%)><EFBFBD>ű<EFBFBD><EFBFBD>ļ<EFBFBD>.txt
|
|||
|
set jb=%cd%\<5C>ű<EFBFBD><C5B1>ļ<EFBFBD>.txt
|
|||
|
|
|||
|
cd ..
|
|||
|
echo pp=%jb%
|
|||
|
del /q <20>ű<EFBFBD><C5B1>ļ<EFBFBD>.txt
|
|||
|
mklink <20><><EFBFBD>½ű<C2BD>.txt %jb%
|
|||
|
echo ִ<>гɹ<D0B3><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> v%oldVersion%
|
|||
|
goto end
|
|||
|
|
|||
|
:not_admin
|
|||
|
echo not as admin
|
|||
|
|
|||
|
:end
|
|||
|
ping 127.0.0.1 -n 3 >nul
|
|||
|
exit
|
|||
|
|