How To Run BattleField2 Command and Control (BF2CC) Daemon (BF2CCD) as a Windows Service with FireDaemon
Battlefield2 Command and Control Daemon (BF2CCD) is used to launch and remotely control the Battlefield 2 Dedicated Server. BF2CCD can be run as a Windows Service using
FireDaemon for additional resiliancy. For information on using the Battlefield2 Command and Control Client please to the
BF2CC website.
Trinity can also be used to manage your BF2CC and other Windows services remotely via web brower. This is how to set it up:
Download and Install BattleField2 Dedicated Server
Please refer to our
BattleField 2 Dedicated Server Setup HOWTO on how to complete this step (including basic dedicated server setup).
Download and Install BF2CCD
Download and unpack BF2CCD in the directory of your choice (eg. C:\Program Files\BF2CCD). Unpack the ModManager Admin scripts found in this directory (look for a file named modmanager-v1.0j.zip or similar) into the top level of your dedicated server installation directory (typically C:\Program Files\EA Games\Battlefield 2 Server).
Launch the BF2CCD GUI
Double click on bf2ccd.exe. The GUI will launch as follows:
An additional dialogue box will be displayed asking you to configure BF2CCD. Fill out the dialogue as per your dedicated server configuration (executables, paths, arguments and so forth).
Make sure you BF2DS launches correctly under BF2CCD before attempting to run it as a service with FireDaemon. This configuration dialog creates an XML file called config.xml in your BF2CCD installation directory. Here's an example configuration (pay special attention to the GameExecArgs attribute:
Code:
<?xml version="1.0" standalone="yes"?>
<dsdDaemonInfo xmlns="http://bf2cc.com/dsdDaemonInfo.xsd">
<DaemonInfo>
<DaemonInfoID>1</DaemonInfoID>
<GameFolder>C:\Program Files\EA GAMES\Battlefield 2 Server\</GameFolder>
<GameExec>Bf2_w32ded.exe</GameExec>
<GameExecArgs>+config "C:\Documents and Settings\jbourne\My Documents\Battlefield 2\ServerConfigs\myServer.con"</GameExecArgs>
<AutoRestart>true</AutoRestart>
<StartupProfile>default</StartupProfile>
<DaemonIP>0.0.0.0</DaemonIP>
<DaemonPort>4712</DaemonPort>
<ModName>bf2</ModName>
<NetSettingsLocked>false</NetSettingsLocked>
<DemoRecordingLocked>false</DemoRecordingLocked>
<PlayerLimit>64</PlayerLimit>
<DaemonArgsPassed>-autostart</DaemonArgsPassed>
</DaemonInfo>
</dsdDaemonInfo>
Install FireDaemon Pro
FireDaemon can be downloaded
from here.
Configure FireDaemon
Double click the FireDaemon desktop icon:
Create a new service by clicking on the
Create a new service definition button in the toolbar or typing Ctrl+N. The New Service Definition dialog will be displayed. Fill out the fields in the Program tab as follows (adjust paths to suite your installation):
The most important field on the tab is the Parameters. The Parameters defines which BF2CCD configuration profile to launch. The "-autostart" parameter by itself will start your BF2DS server with the default.profile. You can specify a different profile with "-autostart myprofile.profile". The BF2CC daemon saves all settings profiles using "*.profile" rather than "*.xml" (even though the files are xml).
Now click on the Settings tab. If you want to see BF2CCD running, check the Interact with Desktop check box. You can optionally run BF2CCD as the user you installed it as. In the Logon Account field type your username (eg. Administrator) and then enter the user's password twice in the Password and Confirm fields.
Now click on the Advanced tab. You can change the Process Priority to allocate more CPU time to the dedicated server or specify which CPU the dedicated server will run on (in the case of multi-processor, hyperthreaded or multi-core CPUs).
Now click on the Dependencies tab. Make sure the service depends on the lanmanworkstation (Workstation) service to ensure the TCP/IP and CIFS stacks are both up prior to starting BF2CCD.
Lastly click on the Pre / Post-Service tab.
We need to shutdown BFCCD gracefully. Click on the Insert button in the Post-Service Program section. A Post Service dialog will popup. Fill it out as follows (adjusting paths to suite your installation).
Now click on the OK button then Install button to install and start BF2CCD!
Stopping the FireDaemon service will stop both BF2CCD and BF2DS gracefully! Issues ... other problems? Please post in the
Public Support Forums!