How I start my servers
Posted: Tue Jan 13, 2015 7:22 am
So, trying to give back what little I can, I wanted to share with everyone how I start my servers.
Right now I am working on a Visual C program that will allow me to not only start my servers, but to modify my settings without having to open the config. Sadly, I have just started that program, and will probably not complete it for a while.
So, I will share the simple bat file I use.
Here is my bat code:
Now, if you want to use this, a few warnings. First, you will need to change the file paths to your files. The cd is simply to change to the folder, and the start command starts the exe file.
Also, I have found that the cd does not change to another drive, so if you have your stuff in another drive, you must do it different, for example:
That would be done if it is in the D drive. Then you can change the folders to match.
Now, one other issue I am working on, but have not yet figured it out. So, I fixed the issue with the User Access Control popping up every time, but it will still pop up when you first click to run the batch file. At least you only have to click it once now. What this does is allow me to put a shortcut on my desktop, and just click this to launch. Eventually, I hope to make it more automated.
Right now I am working on a Visual C program that will allow me to not only start my servers, but to modify my settings without having to open the config. Sadly, I have just started that program, and will probably not complete it for a while.
So, I will share the simple bat file I use.
Here is my bat code:
Code: Select all
@echo off
:: BatchGotAdmin from https://sites.google.com/site/eneerge/scripts/batchgotadmin
:-------------------------------------
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
:--------------------------------------
rem Login Server
cd "I:\PlayOnline\SquareEnix\Final Fantasy XI server\darkstar\"
start DSConnect-server.exe
rem Game Server
start DSGame-server.exe
rem Search Server
start DSSearch-server.exe
rem Ashita
cd "I:\PlayOnline\SquareEnix\Ashita 2\"
start Ashita.exe
exit
Also, I have found that the cd does not change to another drive, so if you have your stuff in another drive, you must do it different, for example:
Code: Select all
rem Login Server
D:
cd "D:\PlayOnline\SquareEnix\Final Fantasy XI server\darkstar\"
start DSConnect-server.exe
Now, one other issue I am working on, but have not yet figured it out. So, I fixed the issue with the User Access Control popping up every time, but it will still pop up when you first click to run the batch file. At least you only have to click it once now. What this does is allow me to put a shortcut on my desktop, and just click this to launch. Eventually, I hope to make it more automated.