Skip to content

Instantly share code, notes, and snippets.

@robot56
Last active December 30, 2015 20:39
Show Gist options
  • Save robot56/7882119 to your computer and use it in GitHub Desktop.
Save robot56/7882119 to your computer and use it in GitHub Desktop.
Batch script for running the game with some diagnostic stuff..
@echo off
:init
title Minecraft checker
echo ===============================================
echo Minecraft checker v1.0 by Extreme_Heat
echo ===============================================
echo.
:authserver
::ping
echo -------------PING TO AUTHSERVER------------- > log.txt
echo. >> log.txt
echo Checking ping to authserver.mojang.com... (1/5)
echo.
ping authserver.mojang.com >> log.txt
::tracert
echo -----------TRACERT TO AUTHSERVER ----------- >> log.txt
echo. >> log.txt
echo Checking tracert to authserver.mojang.com, this may take a few minutes... (2/5)
echo.
TRACERT -h 21 authserver.mojang.com >> log.txt
::tracert
echo -----------TRACERT TO SESSIONSERVER ----------- >> log.txt
echo. >> log.txt
echo Checking tracert to sessionserver.mojang.com, this may take a few minutes... (2/5)
echo.
TRACERT -h 21 authserver.mojang.com >> log.txt
echo ------------ EVENT LOG READER (Prior to launch) --------------- >> log.txt
echo. >> log.txt
echo Checking the system event logs... (3/5)
echo.
wevtutil qe Application /f:Text /c:20 /rd:True >> log.txt
echo. >> log.txt
echo ############################################################ >> log.txt
wevtutil qe System /f:Text /c:20 >> log.txt
echo ----------- LAUNCHING MINECRAFT ----------- >> log.txt
echo Trying to launch Minecraft... (4/5)
echo.
IF NOT EXIST Minecraft.jar (
echo We could not find Minecraft.jar in this folder, please download it and run this script again!
echo.
goto quit
)
java -jar Minecraft.jar >> log.txt
echo Resuming script, DO NOT CLOSE THIS WINDOW!...
echo.
echo ------------ EVENT LOG READER (After launch) --------------- >> log.txt
echo. >> log.txt
echo Checking the system event logs... (5/5)
echo.
wevtutil qe Application /f:Text /c:20 /rd:True >> log.txt
echo. >> log.txt
echo ############################################################ >> log.txt
wevtutil qe System /f:Text /c:20 >> log.txt
echo.
echo Done!
echo.
echo I have created a log.txt file, which contains all the log info, which I will open now:
ping 0 > NUL
notepad log.txt
:quit
pause
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment