furrycat's Battlecom pages

Don't use Battlecom; use Teamspeak

Instructions on setting up Battlecom to run as a service under Windows NT/2000 are now available.

Instructions on setting permissions to allow a non-administrator to start and stop the service are now available.

Firewall configuration for Battlecom

Battlecom is a DirectPlay application, so to run either the client or the server you need to allow both incoming and outgoing connections to tcp and udp ports 2300-2400 and 47624. If you are running the server you will need to allow incoming connections to tcp port 40889. If you are running the client you will need to allow outgoing connections to that port.

Here are the ipfilter rules I use:

pass in proto tcp/udp from any to CLIENT 2300 >< 2400
pass in proto tcp/udp from any 47624 to CLIENT
pass in proto tcp from any 40889 to CLIENT
pass in proto tcp/udp from any to CLIENT 47624
pass in proto tcp/udp from any to SERVER 2300 >< 2400
pass in proto tcp/udp from any to SERVER 47624
pass in proto tcp from any to SERVER 40889

Running Battlecom as a service

Windows NT is able to run programs as "services" in the background. A service can run even if no-one is logged on to the computer to control it. Windows 2000 extends this functionality and is capable of restarting services that die.

Normally, software has to be explicitly written to run as a service but Microsoft make available some useful tools that enable you to run pretty much anything as a service.

The following only applies to Windows NT/2000/XP. It will NOT work on Windows 95/98/ME.

What we will do

We will run the Battlecom server as a service. It will keep on truckin' in the background whether we are logged on or not and it will be restarted if (when) it crashes.

Required software

If you haven't already done so, download these:

Battlecom server
Registry entries

instsrv.exe and srvany.exe are commandline tools from Microsoft that come with the NT resource kit. I recommend downloading them into your C:\WINNT\System32 directory (or more correctly, your %systemroot%\system32 directory) and for the remainder of this article I will assume you have done so.

The procedure

Configure Battlecom

Create a new service

Import the registry entries

Start the service

Removing the service

If you decide you no longer want to run Battlecom 24/7, stop it using the Services console and then pull up a command prompt and run:

instsrv Battlecom remove

A more elegant solution would be to change the service's Startup type (double click Battlecom in the console) to Manual, so it will not be started at bootup, and then simply stop it. This way you don't have to go to all the trouble of configuring everything if you decide later that you do want to run it after all.

Server administration

When Battlecom runs as a service it doesn't show up on the screen. If you want change the default settings you must first stop the service, run Battlecom manually, change whatever you wish (setting the new configuration to the default) and finally restart the service.

Delegating control of the service to non-administrators

The main problem with Battlecom running as an NT service is that you need to be an administrator to control it. The following is a way to allow an unprivileged user to start and stop the service.

Assume you created a user called bcadmin. If you wanted trusted friends to be able to control your Battlecom server you could grant this user logon access via Terminal Services. To give the user permission to start and stop the service, you need to set an ACE on the service registry entries. The easiest way to do this is to download subinacl.exe if you don't already have it (it's from the Resource Kit) and run this command:

subinacl /service Battlecom 

Change bcadmin if you chose a different username.

Please note that STOP doesn't mean the right to stop the service. It's the four options S, T, O and P together!

This user can now login and control the service from the services snap-in of mmc or using the Resource Kit tool sc.exe.

This is desirable as sometimes Battlecom "half-crashes," leaving itself in a state where the service manager thinks it is still running but the actual program is not working. If you happen to be away/asleep/busy when this happens, your server will be inaccessible. If someone notices and can login as an unprivileged user and fix it, the problem is solved!


Send any comments to swat3@furrycat.net.