|
|
@@ -1,11 +1,23 @@
|
|
|
@echo off
|
|
|
chcp 65001
|
|
|
|
|
|
+rem 设置目标日期和时间
|
|
|
+set "targetDateTime=2023-10-09 23:59:59"
|
|
|
+
|
|
|
:: Get the directory of the script
|
|
|
for %%I in ("%~dp0.") do set "SCRIPT_DIR=%%~fI"
|
|
|
:: Change directory to the parent directory of the script
|
|
|
cd /d "%SCRIPT_DIR%"
|
|
|
|
|
|
+rem 获取当前日期和时间
|
|
|
+for /f "delims=" %%a in ('wmic os get LocalDateTime ^| find "."') do set currentDateTime=%%a
|
|
|
+rem 比较日期和时间
|
|
|
+if "%currentDateTime%" gtr "%targetDateTime%" (
|
|
|
+ echo 授权已过期,请联系管理员
|
|
|
+ cscript msgbox.vbs "轨道交通插件 & 授权已过期,请联系管理员"
|
|
|
+ exit 1;
|
|
|
+)
|
|
|
+
|
|
|
start /B /MIN cmd /C stop.bat 8080
|
|
|
timeout /t 1 /nobreak
|
|
|
start /MIN cmd /C start.bat > NUL 2>&1
|