This process produces an automated, silent-capable installer for Folding@Home. As such, it is possible to use this to install on any Windows NT, 2000, XP or 2003 computer with the Microsoft Installer services (pretty much everything from the past decade).
You are reminded that you must not deploy Folding@Home to any computer you do not personally own, unless the owner has explicitly given you informed consent. For example, this means you must not install on your work computer unless the company owner has given you permission.
For this reason, no FAH configuration files are provided with the build scripts; you must produce your own configuration files.
Microsoft have released a tool called WiX (http://wix.sourceforge.net/) that makes it possible to build an MSI package using an XML source file. The XML file refers to all the files needed to install Folding and contains all the configuration information required to install services.
Create a directory on your hard disk to hold the build scripts and supporting files. For the purposes of this page we'll use the example C:\FAH-MSI.
Download the build script ZIP file and extract the contents to your build directory.
WiX is open source software, available from SourceForge. At the time of writing, the most recent stable version was 2.0.3719.0 (http://sourceforge.net/project/showfiles.php?group_id=105970&package_id=114109). Make sure you get the binary ZIP file and not the source – it's about 1.5MB.
Unzip the contents to a suitable directory; I'm going to use the example C:\WiX for the purposes of this page. Once you've unzipped you should be able to find C:\WiX\Candle.EXE and subdirectories called ca, doc and lib.
WiX requires the .NET Framework which is downloadable from Microsoft this one is version 1.1, or this one is version 2.0).
For the build command script to work you need to set an environment variable so that the script can find where you've extracted the WiX binaries.
If you only want to set the variable while you build the MSI files, open a Command Prompt and type:
SET WIX_HOME=C:\WiX
Don't forget to use the path where you extracted the ZIP file. Also, if the path you used has any spaces, please do NOT use any double quotes:
SET WIX_HOME=C:\Program Files\WiX
SET WIX_HOME=D:\Open Source\SourceForge\WiX
etc.
To make the environment variable permanent, right-click My Computer, choose Properties, select the Advanced tab, and click the Environment Variables button. Add the new environment variable to the System Variables list.
Now we need to download the FAH master executable from Stanford (http://folding.stanford.edu/download.html). It's entirely your choice whether you use the stable 5.02 version or the beta 5.04. Save the downloaded file in your build directory as FAH-Console.exe. Of course, you can also copy it from any existing installation of FAH on your computer.
Next copy all the most current core processor files you can find to the build directory:
* FahCore_65.exe
* FahCore_78.exe
* FahCore_79.exe
* FahCore_7a.exe
* FahCore_96.exe
If you cannot find, or do not have the core files, you'll need to comment out the appropriate lines in the build scripts (*.wxs). To comment out including a core, place <!-- at the start of the line and --> at the end of the line. You'll get errors during the build if this isn't done.
This is probably the most annoying part of building the installer environment. Run the FAH executable with the -configonly switch:
FAH-Console -configonly
Go through the configuration wizard, entering all your details as appropriate. Copy this file to Client.CFG-01.
Now go through the wizard again, including advanced mode, and set the Machine ID to 2. Copy this file to Client.CFG-02.
Repeat the above steps up to Machine ID 8.
Open your command prompt and change to your build directory. Run the command:
Build-FAH
and if all is correct, 8 new MSI files will be created. If you're including all the cores, these files will probably range from 5.2 MiB to 40 MiB in size.
The command line used to run the service includes the following arguments:
-svcstart -forceasm -advmethods -local
This may not be appropriate for your environment – you can change the parameters used for the service in each .WXS file – look for the line:
<ServiceInstall Id="FAHService01" (or similar) and you will find the command line parameters.
Double-click on the MSI file to install with a normal installation wizard interface. Follow the bouncing ball, as it were.
Or, run the command:
msiexec /i FAHService-0x.MSI /qb-
for a nearly silent installation (you'll see the installation proceed without needing input). Change /qb- to just /q for a completely silent installation.
You should also be able to use a group policy to deploy the MSI file in an Active Directory environment – but showing you how to do this is out of the scope of this page.
Updated versions of any of the build scripts can be sent to me directly – djr[at]pdconsec[dot]net – replace [at] with @ and [dot] with a period, obviously. I'll eventually get SubVersion permitting anonymous retrieval of this code from svn://goliath.pdconsec.net/Folding@Home/Trunk, and new versions will also be uploaded to OCAU.
Uninstallation is not clean. For some reason the generated removal code does not correctly remove the work folder (and thus the FAHx folder), despite the WiX script including instructions for the removal. Not sure if this is a bug in my script or in the generated MSI.
Also, it would be far, far better if Folding ran as Local Service or Network Service rather than SYSTEM, but I'm yet to determine which, if either, is suitable, and also I don't yet know how to make that part of the .WXS script.
These files are released under the GNU General Public License, version 2. The license is present in the ZIP file as the file GPL2.TXT. Later versions of the GPL do not apply.