123456789101112131415161718192021222324252627282930313233343536373839 |
- @ECHO OFF
- SET perr1=1
- SET perr2=1
- SET perr=0
- setlocal EnableDelayedExpansion
- FOR /f "delims=" %%i IN ('ping -n 1 -w 1 log-upload-os.hoyoverse.com') DO (
- echo %%i | find "[0.0.0.0]" >nul
- IF !ERRORLEVEL! EQU 0 SET "perr1=0"
- echo %%i | find "could not find host" >nul
- IF !ERRORLEVEL! EQU 0 SET "perr1=0"
- )
- FOR /f "delims=" %%i IN ('ping -n 1 -w 1 sg-public-data-api.hoyoverse.com') DO (
- echo %%i | find "[0.0.0.0]" >nul
- IF !ERRORLEVEL! EQU 0 SET "perr2=0"
- echo %%i | find "could not find host" >nul
- IF !ERRORLEVEL! EQU 0 SET "perr2=0"
- )
- IF %perr1% EQU 1 SET perr=1
- IF %perr2% EQU 1 SET perr=1
- IF %perr% NEQ 0 (
- echo Logging servers are reachable. Please edit your /etc/hosts to block them. See install.sh for the list >_error.txt
- notepad _error.txt
- del _error.txt
- exit
- )
- start StarRail.exe %*
|