Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to create a batch file for a friend because he has some problems on minecraft. He needs to launch minecraft 80 times without closing java error... I have 2 batches, one with a while, and an other one executing java command for launching minecraft.

::Launcher.bat
title Script Minecraft
set tour=10
set tour2=tour

:boucle
set /a tour=tour-1
call "D:\thepath\Minecraft2.bat"
if %tour%==0 goto suite
goto boucle

:suite
wait javaw.exe

:boucle2
set /a tour2=tour2-1
taskkill /F /IM "javaw.exe"
if %tour2%==0 goto fin
goto boucle2

:fin
echo Appuyez sur une touche pour quitter...
pause >nul

and the other one

::Minecraft2.bat
@echo off
java -Xmx2048m -Xms1024m -cp "D:\thepath\Minecraft.exe" net.minecraft.LauncherFrame

My problem is that when it calls the second batch, it's waiting for closure of the window but we must leave them opened !

If someone has already encountered this problem, I'd be grateful.

Thanks

PS: If my english is bad, it's because I'm french ;)

share|improve this question
add comment

1 Answer

just use an .vbs file (in notepad: save as all -> invisible minecraft start.vbs) :

Set WshShell = CreateObject("WScript.Shell") 
WshShell.Run chr(34) & "C:\minecraft.bat" & Chr(34), 0
Set WshShell = Nothing

and make an batchfile you want to call : minecraft.bat

START "minecraft" /high /wait "C:\Program Files\Java\jre7\bin\javaw.exe" -Xms1024m -Xmx2048m -cp "%APPDATA%\.minecraft\bin\minecraft.jar;%APPDATA%\.minecraft\bin\jinput.jar;%APPDATA%\.minecraft\bin\lwjgl.jar;%APPDATA%\.minecraft\bin\lwjgl_util.jar" -Djava.library.path="%APPDATA%\.minecraft\bin\natives" net.minecraft.client.Minecraft <username> <password>

of course, change to the username and to password

save these 2 in C:\ and make an link from the invisible mminecraft start to your desktop. that's all...

this will help you, but your friend has to update java from java.com

ps. if MY english is bad, i am dutch...

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.