From f9a1ec5febfd3cb38d47cdc22188c20c3cbc48ef Mon Sep 17 00:00:00 2001 From: misyaguziya Date: Fri, 13 Oct 2023 21:59:38 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8D[Update]=20Model=20:=20batch?= =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=AE=E3=82=B3=E3=83=B3?= =?UTF-8?q?=E3=82=BD=E3=83=BC=E3=83=AB=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=97?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- batch/restart.bat | 2 +- batch/update.bat | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/batch/restart.bat b/batch/restart.bat index fc305a6e..b86be544 100644 --- a/batch/restart.bat +++ b/batch/restart.bat @@ -1,4 +1,4 @@ -@echo off +@if not "%~0"=="%~dp0.\%~nx0" start /min cmd /c,"%~dp0.\%~nx0" %* & goto :eof taskkill /im %1 /F START "" %1 \ No newline at end of file diff --git a/batch/update.bat b/batch/update.bat index 099d8689..2a7fc7b2 100644 --- a/batch/update.bat +++ b/batch/update.bat @@ -1,9 +1,11 @@ +@if not "%~0"=="%~dp0.\%~nx0" start /min cmd /c,"%~dp0.\%~nx0" %* & goto :eof + taskkill /im %1 /F -timeout 2 +ping -n 2 127.0.0.1 > nul del /f %1 -timeout 2 +ping -n 2 127.0.0.1 > nul rename %2 %1 -timeout 2 +ping -n 2 127.0.0.1 > nul if %3 == True ( START "" %1 ) \ No newline at end of file