self_slaughter

Untitled

Nov 15th, 2012
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. @echo off
  2.  
  3. set memory=8192
  4. set java=C:\Program Files\Java\jre7\bin
  5.  
  6. setlocal enabledelayedexpansion
  7. title Minecraft launcher (by self_slaughter)
  8.  
  9. :detection
  10.  
  11. cd /d %~dp0
  12. set /a count=0
  13.  
  14. for /d %%g in (*) do (
  15. set /a count+=1
  16. set var!count!=%%g
  17. )
  18.  
  19. set /a linecount=(%count% + 7)
  20. mode con: cols=52 lines=%linecount%
  21.  
  22. :menu
  23.  
  24. @echo off
  25. cls
  26. echo.
  27. echo Automagic Minecraft version selector
  28. echo ------------------------------------
  29. echo.
  30.  
  31. for /l %%a in (1,1,%count%) do (
  32. echo %%a - !var%%a!
  33. )
  34.  
  35. echo.
  36. set /p choice=Enter a number between 1-%count% and press enter:
  37.  
  38. :errordetect
  39.  
  40. echo %choice%|findstr /r /c:"^[0-9][0-9]*$" >nul
  41. if errorlevel 1 goto :menu
  42. if %choice% geq 1 if %choice% leq %count% goto :minecraft
  43. goto :menu
  44.  
  45. :minecraft
  46.  
  47. set appdata=%~dp0\!var%choice%!
  48. start "" "%java%\javaw.exe" -Xincgc -Xmx%memory%M -cp minecraft.jar net.minecraft.LauncherFrame
Advertisement
Add Comment
Please, Sign In to add comment