I’ve got the page working to start the exe. using the following:
<form method="post"><input type="submit" name="submit" value="Start Game Server"> | <input type="submit" name="submit" value="Start Master Server"></form>
<?php
if($_POST['submit'] == "Start Game Server")
{
exec("E:\\GameServer\\Server.exe");
echo "Game server has been started";
}else
{
exec("E:\\MasterServer\\MasterServer.exe");
echo "Master Server has been started";
}
?>
Does anyone know how to check to see if it’s already running? can i use
I’m not very familiar with the windows command line. But if you plan to start a process from php, you’ll need to do it in a way that lets the php script exit before the process finishes. Maybe try searching php background process windows to see what the commands would be.
I just played with it real quick and this seems to work to see if a process is running
tasklist /fi “imagename eq apache.exe”