Service Install Procedures
There are several ways to run F@H clients as service. Here I'll list some ways to hide the F@H text clients. (Sorry no graphical client).
Ocforum One Click
I found this in Ocforum.com. All credits go to them.
Service for 1 CPU
Service for dual CPU or Intel with Hyperthread
Here's how you can set up the client using this way:
1. You download the file
2. You edit the client.cfg(s) with your username. Right now the client has the 5MB work unit download enabled. If download bandwidth is a problem change bigpackets answer to no.
3. You click the .exe
4. The One-Click then creates the appropriate directories (C:\Program Files\FAH), (now) downloads the FAH502-Console.exe, creates and installs FAH as a service in the registry, removes the extra install files after completion, and starts FAH as a service.
There is an extra edit required in the client.cfg if you want to fold BigPacket WU's. There has been ample discussion about this, but here's the basic rules: If you have more than 1GB of RAM per CPU, then you can fold BigPackets. If you want BigPackets, simply edit the client.cfg's to "bigpackets=yes".
*Note: With some W2K and XP Home rigs you have to reboot to get the service running. So if you use the One-Click and don't see FAHCore_##.exe running after a minute in the task manager, just reboot.
Buzzard from the OCAU team made an excellent install for people who want to chose all the options themselves (flags, run as a service, install directory etc). You can download it
here.
Win9x One-Click
Nitro-Boie made this nice batch install for Win9x machines. Download it
here.
How-to Install FAH as a service and set the flags, the long version.
For those of you interested in what was just accomplished in the above One-Click FAH Installs and want to know where the FAH service is installed, what we are talking about when we say "flags" and where they are located, read on.
Your computer needs three things to run FAH as a service: The appropriate files have to be located on your computer, the service has to be entered into the registry, and the service needs to be started. Let's take a look at them step by step.
The FAH Files.
To start using FAH as a service,FAH needs three files located in a directory (such as C:\Program Files\FAH), which are;
1. "The Client" the actuall folding program from Stanford which is currently FAH4console.exe.
2. "The Client.cfg" This is the client configuration file which holds your username, team number, and many other specifics about you computer and how it should fold.
3. srvany.exe Microsofts own creation that's been around for years. This program enables you to run any other program as a service as long as the registry is set up correctly.
*Note: There are other files necessary for FAH to run, however, to simply installed FAH and set it up as a service, these three files are all you need. One such example is "The Core", the proggy that crunches the numbers and whose name is formatted as Core_##.exe.
With these three files in place, we can now check out what is required in the registry to initiate the service.
FAH in the registry
(Appropriate Disclaimer here: editing you registry can kill your OS, blow up your computer, and make your pets pee on your carpet. Wedo, The One-Click, and all partners therein are not responsible for your actions on your computer. Do so at your own risk)
To set up FAH in the registry, you need to only make a handful of registry additions in one location. An example of an exported install reg file is located below (one could copy/paste this into notepad, save it as "FAH-Install.reg" and merge it if need be):
---copy below this line ----
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FAH]
"Type"=dword:00000010
"Start"=dword:00000002
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):22,00,44,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,\
6d,00,20,00,46,00,69,00,6c,00,65,00,73,00,5c,00,46,00,41,00,48,00,31,00,5c,\
00,73,00,72,00,76,00,61,00,6e,00,79,00,2e,00,65,00,78,00,65,00,22,00,00,00
"DisplayName"="Folding@Home 1"
"ObjectName"="LocalSystem"
"Description"="Uses your computer's spare CPU cycles to solve complex scientific problems."
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FAH\Parameters]
"Application"="D:\\Program Files\\FAH\\FAH4Console.exe"
"AppDirectory"="D:\\Program Files\\FAH1"
"AppParameters"="-local -service -forceSSE -advmethods"
---copy above this line----
In the above settings, "Type", "Start", and "ErrorControl" are DWORD hex values. When you create the keys manually, you would use the actual values of:
Type: "16"
Start: "2"
ErrorControl: "1"
and Windows will convert them to hex values. Furthermore, "ImagePath" is a string value that should match the directory for your FAH installation, such as: "C:\Program Files\FAH\srvany.exe"
Note the reference to the 'srvany.exe' here, this is what kicks FAH into a service.
In addition, for additional client installs (dually/quad installs) the service name is changed in the registry from FAH to FAH1, FAH2 and so on. The appropriate paths would also have to be placed in the registry entries to point to directories such as C:\Program Files\FAH\FAH1 and FAH\FAH2 etc.
The "Flags" explained
You'll notice that in the above registry export file under the second key (\FAH\Parameters) there is a little line called "AppParamters", herein lies the much talked about option flags for running FAH.
Here is your guide to the flags:
-local: Used with multiple cpu rigs (dually, HT, quad cpus etc) to set up FAH as one client per one cpu. If this flag isn't used on a dually and two instances are running, your rig will show up as running at 50% in task manager as both instances will split the processing power of one cpu leaving the other to sit at idle.
-service: Sets FAH as a service. Very important flag that will tell your rig to use srvany.exe to run FAH4Console.exe as a service instead of running the client in the console window. Thereby keeping your rig folding even when no one is logged on.
-forceasm: Forces the use of 3DNow and SSE. In some instances, if a power failure occured, your computer locks up (not due to FAH), or your kid brother kicks over your tower, FAH will restart in a form of "safe mode" that doesn't use 3DNow/SSE. This will cause your machine to fold much slower so this flag forces the higher setting on no matter how the client was turned off previously.
-advmethods: The gromacs flag. This flag tells FAH to only seek out Gromacs (a type of protein) from the Stanford servers. Gromacs used to be the end-all-be-all of point production. However, recent changes to the point value for Tinkers have made this flag counter-productive on AMD rigs.
-verbosity 9: Gives you the uber update in your log files. More info will be written in case your having issues or are just interested in what FAH is doing.
-----------------------------------------------------------------------