launcher.bat 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. @echo off
  2. REM Notice: This file is overwritten for each patch for safety reasons.
  3. REM Hence, any manual changes will be overwritten by the next patch.
  4. REM ============ AVOID CHANGES HERE ============
  5. SET perr=0
  6. REM Verify that the important hosts are blocked
  7. ping -n 1 -w 1 log-upload-os.mihoyo.com | find "[0.0.0.0]" >nul
  8. IF %ERRORLEVEL% NEQ 0 SET perr=1
  9. ping -n 1 -w 1 overseauspider.yuanshen.com | find "[0.0.0.0]" >nul
  10. IF %ERRORLEVEL% NEQ 0 SET perr=1
  11. IF %perr% NEQ 0 (
  12. REM Show the message to the user
  13. echo ERROR: Crucial domains are not blocked. Please re-run the patch script. >_error.txt
  14. notepad _error.txt
  15. del _error.txt
  16. exit
  17. )
  18. REM Emulate the games behaviour
  19. copy mhyprot2.sys "%TEMP%\"
  20. regedit mhyprot2_running.reg
  21. REM Disable crash reporting
  22. IF EXIST GenshinImpact_Data\upload_crash.exe (
  23. move "GenshinImpact_Data\upload_crash.exe" "GenshinImpact_Data\upload_crash.exe.bak"
  24. )
  25. REM ============= Launch the game =============
  26. REM https://docs.unity3d.com/Manual/CommandLineArguments.html
  27. REM Append the arguments to the command: launcher.bat arg1 arg2 ...
  28. start GenshinImpact.exe %*