I coded a website where my friends can start and close their Minecraft server over PHP. To stop their server, a .bat file kills the process, but normally Minecraft servers will be stopped with the "Stop" command. The Minecraft server is running in a CMD and so my question is:
Is it possible to send a command from a started .bat to a separate, already open CMD so that the already open CMD stop the Server?
You can send keys to the console - but eventually you'll need to know the name of the command prompt window. Check the ready to use sendKeys.bat :
call sendKeys.bat "command prompt" "stop{ENTER}"
in case the title is just command prompt
- it could be different so you need to check this.
Default title:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With