How do I run the console as a Service?
From FaHWiki
As of version 5.02 of the FAH console for Windows NT/2000/XP, 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.
Contents |
Setting the Service At Initial Setup
Simply answer, YES, to the service question when setting up.
[20:21:48] Configuring Folding@Home... User name [Username]? Team Number [0]? Launch automatically at machine startup, installing this as a service (yes/no) [no]? yes
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:
- 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.
These methods work also with previous releases of the client, without the built in service option.
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.
See also
- Running the console as a restricted service
- How do I add flags using a shortcut to the console client?
- How do I add flags when running the console in service mode?
- How do I know what the flags are, and what they do?
- Folding-community: Run service when no one is logged in.
---
-=MB=-
FCF MOD
14:33, 11 Jun 2005 (PDT)

