jege Posted July 2, 2012 Share Posted July 2, 2012 Hey, I'm trying to make a script which runs an .bat file. Currently ive used exec('c:\WINDOWS\system32\cmd.exe /c START <path here>'); but doesn't work like I want. The .bat file runs my minecraft server, if you have ever run one you need to run a .bat file which executes then a .jar file. This is the content of the .bat file java -Xms1024M -Xmx1580M -jar craftbukkit-1.2.5-R3.0.jar pause If there anyway when I run that it will start that .bat file. The .bat file and the webserver is on the same machine. Tho Xampp is in C:/ drive and the server on D:/ Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/265102-execute-a-cmd-bat-file/ Share on other sites More sharing options...
ZulfadlyAshBurn Posted July 2, 2012 Share Posted July 2, 2012 <?php exec("java -Xms1024M -Xmx1580M -jar craftbukkit-1.2.5-R3.0.jar",$output); ?> Quote Link to comment https://forums.phpfreaks.com/topic/265102-execute-a-cmd-bat-file/#findComment-1358504 Share on other sites More sharing options...
jege Posted July 2, 2012 Author Share Posted July 2, 2012 But that doesn't either work, is it possible to make it run the bat itself, since it has the console also. So it would run similar if it would an human would open it with his mouse. Quote Link to comment https://forums.phpfreaks.com/topic/265102-execute-a-cmd-bat-file/#findComment-1358507 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.