Update updater.bat
This commit is contained in:
parent
2dd2f5febe
commit
11bcf46063
@ -31,7 +31,6 @@ IF DEFINED _updateb (
|
|||||||
DEL /F "[updated]!_myname!.bat.old"
|
DEL /F "[updated]!_myname!.bat.old"
|
||||||
CALL :message "Script updated^!"
|
CALL :message "Script updated^!"
|
||||||
TIMEOUT 3 >nul
|
TIMEOUT 3 >nul
|
||||||
CLS
|
|
||||||
GOTO begin
|
GOTO begin
|
||||||
)
|
)
|
||||||
REM ## Phase 1 ##
|
REM ## Phase 1 ##
|
||||||
@ -46,11 +45,9 @@ IF DEFINED _updateb (
|
|||||||
) >nul 2>&1
|
) >nul 2>&1
|
||||||
IF EXIST "[updated]!_myname!.bat" (
|
IF EXIST "[updated]!_myname!.bat" (
|
||||||
START /min CMD /C "[updated]!_myname!.bat" !_myparams!
|
START /min CMD /C "[updated]!_myname!.bat" !_myparams!
|
||||||
EXIT /B
|
|
||||||
) ELSE (
|
) ELSE (
|
||||||
CALL :message "Failed. Make sure PowerShell is allowed internet access."
|
CALL :message "Failed. Make sure PowerShell is allowed internet access."
|
||||||
TIMEOUT 120 >nul
|
TIMEOUT 120 >nul
|
||||||
EXIT /B
|
|
||||||
)
|
)
|
||||||
) ELSE (
|
) ELSE (
|
||||||
IF "!_myname!"=="[updated]" (
|
IF "!_myname!"=="[updated]" (
|
||||||
@ -68,10 +65,11 @@ IF DEFINED _updateb (
|
|||||||
COPY /B /V /Y "!_myname!.bat" "!_myname:~9!.bat"
|
COPY /B /V /Y "!_myname!.bat" "!_myname:~9!.bat"
|
||||||
START CMD /C "!_myname:~9!.bat" !_myparams!
|
START CMD /C "!_myname:~9!.bat" !_myparams!
|
||||||
)
|
)
|
||||||
EXIT /B
|
|
||||||
)
|
)
|
||||||
|
EXIT /B
|
||||||
)
|
)
|
||||||
:begin
|
:begin
|
||||||
|
CLS
|
||||||
ECHO:
|
ECHO:
|
||||||
ECHO:
|
ECHO:
|
||||||
ECHO: ########################################
|
ECHO: ########################################
|
||||||
@ -118,7 +116,7 @@ IF DEFINED _log (
|
|||||||
:log
|
:log
|
||||||
SET _log=2
|
SET _log=2
|
||||||
ECHO:##################################################################
|
ECHO:##################################################################
|
||||||
CALL :message "%date%, %time%"
|
ECHO: %date%, %time%
|
||||||
)
|
)
|
||||||
IF EXIST user.js.new (DEL /F "user.js.new")
|
IF EXIST user.js.new (DEL /F "user.js.new")
|
||||||
CALL :message "Retrieving latest user.js file from github repository..."
|
CALL :message "Retrieving latest user.js file from github repository..."
|
||||||
@ -254,7 +252,6 @@ CALL :message " -updatebatch"
|
|||||||
ECHO: Update the script itself on execution, before the normal routine.
|
ECHO: Update the script itself on execution, before the normal routine.
|
||||||
CALL :message ""
|
CALL :message ""
|
||||||
PAUSE
|
PAUSE
|
||||||
CLS
|
|
||||||
MODE 80,25
|
MODE 80,25
|
||||||
GOTO :begin
|
GOTO :begin
|
||||||
REM #####################################
|
REM #####################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user