123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- @echo off
- SET perr1=1
- SET perr2=1
- SET perr3=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"
- )
- FOR /f "delims=" %%i IN ('ping -n 1 -w 1 overseauspider.yuanshen.com') DO (
- echo %%i | find "[0.0.0.0]" >nul
- IF !ERRORLEVEL! EQU 0 SET "perr3=0"
- echo %%i | find "could not find host" >nul
- IF !ERRORLEVEL! EQU 0 SET "perr3=0"
- )
- IF %perr1% EQU 1 SET perr=1
- IF %perr2% EQU 1 SET perr=1
- IF %perr3% EQU 1 SET perr=1
- IF %perr% NEQ 0 (
- echo ERROR: You opted to block the analytics servers but they are reachable. Please re-run the patch script. >_error.txt
- notepad _error.txt
- del _error.txt
- exit
- )
- copy mhyprot3.sys "%TEMP%\"
- copy HoYoKProtect.sys "%WINDIR%\system32\"
- regedit mhyprot2_running.reg
- IF EXIST GenshinImpact_Data\upload_crash.exe (
- move "GenshinImpact_Data\upload_crash.exe" "GenshinImpact_Data\upload_crash.exe.bak"
- )
- IF EXIST GenshinImpact_Data\Plugins\crashreport.exe (
- move "GenshinImpact_Data\Plugins\crashreport.exe" "GenshinImpact_Data\Plugins\crashreport.exe.bak"
- )
- start GenshinImpact.exe %*
|