Run Tribes as a service under NT/2000/XP

FUBAR|Ascain
01-25-2004, 07:32 PM
I can't remember who asked me earlier on how to run Tribes as a service under NT, so I'm going to post the response here in hopes the right guy swings by... :weird:

You're going to need the files INSTSRV.exe and SRVANY.exe from your resource kit cd, then follow the instructions below.

*** WARNING: if you screw up your registry you can seriously screw up your windows, you've been warned ***
1. First you need to copy the files to your system somewhere, (c:\tools or somesuch...) then install the SrvAny service:
INSTSRV Tribes_server c:\tools\srvany.exe

2. In your services applett configure how you want the service to start (automatic, manual, etc) and be sure to set it to allow interaction with desktop.

3. Now you need to add the parameters to srvany to make it actually run your tribes service... Fire up Regedit(32) and follow along:

* under HKEY_LOCAL_MACHINE\SYSTEM \CurrentControlSet\Servic es\Tribes_server create a 'Parameters' key
* Inside the Parameters key, create a new string value Application... enter the full path to your infinitespawn.exe (ie 'e:\tribes\infinitespawn. exe')for the new string value
* Inside the Parameters key, create a new string value AppParameters... enter the command line parameters you use for infinitespawn (ie -mod modname +exec ServerConfig.cs +exec modname.cs -dedicated) for the new string value
* Inside the Parameters key, create a new string value AppDirectory... enter the path to your tribes directory (e:\tribes) for the new string value
the structure should be like this:
Parameters
|- Application
|- AppParameters
|- AppDirectory

Close regedit and you're done.

Now you can start/stop the service from your services applet, and if you've enabled it the server will start when the system boots without having to log in.

Hope that made some sense and it helps you out.


Grab SRVANY and INSTSRV here (http://www.kittynet.com/download/srvcutil.zip)

Shinigami
01-25-2004, 07:40 PM
Question for the ignorant (me). What advantages are there to running an app as a service?

FUBAR|Ascain
01-25-2004, 07:44 PM
A service will automatically start when the systems starts if configured to do so. (good for server reboots)

You can have the service auto restart if it crashes. (good for poorly coded or beta game servers)

You can hide the service from the console (desktop) if you secretly host it at work.

Shinigami
01-25-2004, 08:31 PM
Ah, alright. Thanks.

Tofutti
01-26-2004, 09:13 AM
would using firedaemon somehow be different or better/worse?

Data
01-26-2004, 10:24 AM
Ascain rocks this forum. :p

FUBAR|Ascain
01-26-2004, 12:31 PM
Firedaemon will do pretty much the same thing. The big difference is firedaemon gives you a nice gui to set everything up where srvany is manual.

I've used srvany since NT4, and since it's so small and no resources used I've never had the need to switch.

:heart: Data

CandyMan
01-28-2004, 02:19 AM
actually there are serious drawbacks to this also.
Once you make a code change on the machine that requires the "service" to restart you are fucked until the machine is rebooted.
Stopping the service doesn't actually stop the server, in fact it doesn't do anything. It does work extremely well if you have a machine that for some reason you can't console into, remote into or walk up to and launch the icon.