How do I run the console as a Service?

As of version 5.02 of the FAH console for Windows NT/2000/XP/Vista, there is a built in service option.

This can either be set during initial install, or later by running the -config or -configonly option.

It is quite simple.

Setting the Service At Initial Setup
When asked:

Change Advanced Options (yes/no) [no]? Select Yes

When asked:

Launch automatically, install as a service in this directory (yes/no) [no]? Select Yes

Note: Windows Vista will need to run in ADMINISTRATOR MODE in order to install as a service.

Setting the Service After Initial Setup

 * Close the running client.
 * Run the client with the -configonly flag. (See Reconfiguring Client)
 * Answer the Service question. (See Above)
 * Reboot when done.

The client should now be quietly running as a service in the background.

Alternative methods
Alternative methods can be used to run the client as a service: These methods work also with previous releases of the client, without the built in service option.
 * manually creating a service with the tools instsrv.exe and srvany.exe from the Windows Resource Kit.
 * using a third party tool like Folding At Work, which is also using srvany.exe, or any of the other service installers in the Tools List of the 3rd Party Applications section of the Folding-Community forum.

Important Note 1
When you configure a service, it does not start automatically until the next time you reboot. If you used the -configonly flag, the client will stop and that's a good time to reboot. If you used the -config flag, the client will continue to process interactively and there's no need to reboot if you'd rather wait.

Important Note 2
Make sure that you DO NOT have any other shortcuts automatically start this folding instance, before setting the service. If there is more than one client starting the same instance, folding is likely to become unstable. And there is a high probability, that your units will be corrupted.

Run Service at Log Off
You can set the service to only run when users are logged off (where FAH is the service name). You need to run gpedit.msc in Win2k/WinXp Pro and put those scripts:

For logoff:

Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "sc start FAH"

For logon:

Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "sc stop FAH"

Your scripts should have .vbs extensions and be in \WINDOWS\system32\GroupPolicy\User\Scripts\logoff and \logon.