Hey everyone.. First post here, thought I'd share a simple batch file that I've created to start your server quickly and painlessly.. Obviously this wont be helpful to people who are experienced scripters (most of you).. Anyways, here we go
So the goal is to start all of the server programs with one double click of an executable. This is a pretty simple task, but the tricky part is making sure you get them in order. Because the batch file runs through it's commands so quickly, sometimes it will try to open the next .exe before the last one has a chance to open, and this will cause problems with starting your server.
The trick to doing this is implementing a pause between commands, so that you give the executable time to open up completely before opening up the next. In previous versions of windows, this was done easily by using different commands, one of which was actually "WAIT". Now, the only way I know of doing this is tricking the batch file into pinging a non existent ip, and it will cause a slight delay. So to start with, open up notepad (start > run > notepad.exe) and copy / paste this:
This is what you're using to create the delay, we'll call for this file later on when we're creating the actual batch file that will start your server. File > save as > save as type "All Files". Save it as "wait.bat"Code:@ping 127.0.0.1 -n 2 -w 1000 > nul @ping 127.0.0.1 -n %1% -w 1000> nul
Next, open another instance of notepad.
This is going to be the actual program that will run our server files. The syntax to run an exe is as follows:
The part that says name of whatever doesnt really matter, but you have to put it because the first file we're going to open will be in the same directory as this file. If you werent to put this, multiple instances of command prompt would open and your server wouldn't run. Anyways, heres the full code that will go in this file:Code:start "Name of whatever" "Location of exe"
Now, to explain this a little better..Code:@echo off start "Account Server" "D:\Documents and Settings\Administrator\Desktop\Server Files\Program\1.AccountServer.exe" call wait 1 start "Database Server" "D:\Documents and Settings\Administrator\Desktop\Server Files\Resource\2.DatabaseServer.exe" call wait 1 start "Core Server" "D:\Documents and Settings\Administrator\Desktop\Server Files\Program\3.CoreServer.exe" call wait 1 start "Certifier" "D:\Documents and Settings\Administrator\Desktop\Server Files\Program\4.Certifier.exe" call wait 1 start "Login Server" "D:\Documents and Settings\Administrator\Desktop\Server Files\Program\5.LoginServer.exe" call wait 1 start "Cache Server" "D:\Documents and Settings\Administrator\Desktop\Server Files\Program\6.CacheServer.exe" call wait 1 start "World Server" "D:\Documents and Settings\Administrator\Desktop\Server Files\Resource\WorldServer.exe_fixed.exe" exit
Each line is using the syntax I explained earlier to run a specific program. In this example, it's running each program to start the server in the order that I learned how to run them. The problem is, the commands would run so quickly that it would open one before it opened the previous, so the server wouldn't start up correctly.
This is why we use the call command. What that's doing is calling the wait.bat file we created earlier to initialize the pause we created by using a fake ping.
In order for this to work for you, you would need to do two things:
1. Change the directories of each file to point to your specific .exe
2. Change the # after the "call wait" command to the amount of seconds you want the delay to exist.
After you're done copying & pasting, file > save as > save as type "All Files" > File name : "Start Server.bat" (or whatever you want it to be named. Be sure to put this in the same folder you saved the wait.bat file you saved earlier.)
Create a shortcut, and put it on your desktop!
Sorry this post was so long, I wanted to explain what was going on as opposed to simply throwing some codes on here for people to take without fully understanding it.. Hope it's helpful!
Tip: You can even use this to launch your neuz.exe file, and start up fly after you've started all of the server programs. Just use the same syntax, add another line and point to your neuz.exe file.


).. Anyways, here we go
![[Guide] Start Server.bat](http://ragezone.com/hyper728.png)


