Running the Folding@Home Client as a Service in Windows NT/2000/XP
There are several reasons that you might want to run Folding@Home as a Windows service, rather than as a normal application. The most obvious is that it gets rid of the taskbar button, reducing clutter. The second is if you prefer, for whatever reason, to run the client in "stealth" mode, i.e., not visible to casual viewers. The final and possibly most useful reason is that when Folding is running as a service, you are no longer required to be logged in to the machine for Folding to run. This means that if something causes the machine to reboot, genome will resume processing even sitting at the Windows login screen. The following takes you through the process of setting up a standard Folding@Home client to run as a Windows service.
This procedure makes a couple of fundamental assumptions. First of all, it assumes that you have already installed and configured the Folding@Home text-based console client. If not, a trip to the Folding@Home web site will get you started. Secondly, it assumes that the path to the client is "C:\fold\". If you have Folding installed in a different directory, modify the instructions accordingly. Finally, to save aggravation of using a beta or nonbeta console client, copy and rename FAHconsole.exe to fahsrv.exe in the same directory.
In addition to your Folding@Home installation, you will need the two small Microsoft programs in order to set up your service. Instsrv.exe is the program used to create a Windows service, and Srvany.exe is a program that allows almost any other program to run as a service. These files are available in Microsoft's Windows Resource Kit, at various internet sites, or you can just download them both here.
Finally, before we get started, a quick disclaimer: This procedure involves editing the Windows registry, which, by nature, involves some risk. If you are unfamiliar with editing your registry, DON'T DO IT. I cannot and will not be responsible for any damage caused by a hacked registry entry. Secondly, while I have tested this procedure in Windows XP, and it has worked fine in every environment that I've tested, I cannot not be held responsible if it doesn't work for you. Computers are odd creatures, and your mileage may vary...
When you're done, just minimize the command window, as we'll be returning to it later in the process.
The newly-created Folding service will now function as it always has in terms of processing, uploading, and downloading, and any monitoring software will continue to work normally.
If for any reason you should decide you want to remove the Folding service, go to Control Panel->Administrative Tools->Services. Right-click on the Folding service and choose STOP. After the service is stopped, open a command-prompt window, navigate to your folding directory, and type instsrv Folding remove. This will completely remove the service from your system. You can still run your Folding client as you did before, as a normal application.