Why is Minecraft not launching from my batch file?
So I'm having this problem where I'm trying to start Minecraft from a batch file, but everytime I run it, it gives me this error message, "Windows cannot find 'minecraft.exe'. Make sure you typed the name correctly and try again." but what's bothering me is that it has worked fine on my Windows 7 computer.
Here's the code that I used to start Minecraft:
if %input3% == 1 start minecraft.exe
My specs: Windows 8.1, 64-bit, 8GB RAM, 1TB hardrive.
Any help would be great!!
Best Answer
This batch file requires that minecraft.exe be in the %PATH% environment variable, or more likely, in the exact same location as your minecraft.exe file is at. Chances are you wanted to tidy things up and put minecraft elsewhere and have this batch file on your desktop or the like.
Pictures about "Why is Minecraft not launching from my batch file?"



How do I run a batch file in Minecraft?
Steps to solve Minecraft server download problems:How do I fix Minecraft server not running?
Run batch files on startupHow do I enable a .bat file?
1 AnswerMinecraft Server .Bat file is not launching (windows 10)
More answers regarding why is Minecraft not launching from my batch file?
Answer 2
Add this line :
set %path%=%path%;<location of minecraft.exe>
And it will work.
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Karolina Grabowska, Karolina Grabowska, Karolina Grabowska, Fauzan Fitria
