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