So i made a little time saver .bat file, so that i can just click it, and it does everything for me. The scrip is meant to check if MySQL is open, (which is required for the game to run) and then check if Skype is running (as skype blocks one the required ports). If MySQL is not running the batch files launches a vbs message telling the user to open mysql, and if skype is running it tells the user to close it. Here's the code of the batch file:
Code: Select all
@echo off
tasklist /nh /fi "imagename eq mysqld.exe" | find /i "mysqld.exe" >nul && (
cd "C:\Users\PauloHenrique\Desktop\Deep Realms Server\Server Files\Rotmg PServer\Gummy's Realm\bin\Debug"
start server.exe
cd "C:\Users\PauloHenrique\Desktop\Deep Realms Server\Server Files\Rotmg PServer\Gummy's Realm\bin\Debug"
start wServer.exe
exit
) || (
cd "C:\Users\PauloHenrique\Desktop\Deep Realms Server\Server Files\Rotmg PServer\Gummy's Realm"
start error.vbs
)
pause>nul
) || (
tasklist /nh /fi "imagename eq mysqld.exe" | find /i "mysqld.exe" >nul && (
tasklist /nh /fi "imagename eq Skype.exe" | find /i "Skype.exe" >nul && (
cd "C:\Users\PauloHenrique\Desktop\Deep Realms Server\Server Files\Rotmg PServer\Gummy's Realm"
start portblocked.vbs
cd "C:\Users\PauloHenrique\Desktop\Deep Realms Server\Server Files\Rotmg PServer\Gummy's Realm\bin\Debug"
start server.exe
cd "C:\Users\PauloHenrique\Desktop\Deep Realms Server\Server Files\Rotmg PServer\Gummy's Realm\bin\Debug"
start wServer.exe
)
pause>nul
The thing is, i don't have much understanding of batch coding, so everything you see there i either made with some knowledge i got watching some basic tutorials on youtube or i copypasted from other forums. The thing is, it doesn't check if skype is on after cheking if mysql is on, and i don't know how to make it do that. If you could edit it to make it work correctly i'd greatly appreciate it. Additionally, if possible, i wanted to have the program to check if port 80 is blocked/being used instead of checking if skype on, as other programs may also use port 80.
Thanks,
-Paul