Converting UD/WCG to a Windows service
For Install 3 and Install 4: This method of running UD/WCG is not recommended, nor officially supported by WCG. It requires some extra utilities (also available from the grid website) like INSTSRV.EXE, SRVANY.EXE, NIRCMD.EXE, NIRCMDC.EXE and WCGSvcCvt.vbs, and put all of these in one folder on the root of C drive called WCGtoService. It is recommended to keep this folder around in case you need to convert UD.EXE from a Windows service back to a standard executable. The VBS script was written by WCG user “wilsondr”.
The VBS conversion script can easily be tripped up and fail if some things are different from the install defaults (missing shortcut in the current user to UD.EXE), or if the install language for Windows XP is not English. Errors can sometimes leave details unfinished after conversion.
- Modify WCGSvcCvt.vbs so that installFilesLoc points to where the above files are locations (if different than C:\WCGtoService\) and WCGPathToExe points to the correct installation path of WCG (if different than C:\Program Files\WorldCommunityGrid\). The VBS file has some instructions in it about these variables.
- Double-click WCGSvcCvt.vbs to convert UD.EXE to a Windows service. Note that UD.EXE can be active during conversion, the script will take care of this condition. The script will put a zero-byte text file into the WCG install folder called ServiceInstalled.txt. The existence of this file means that the application has already been converted to a service, and the next time the script runs is will look for this file first and if found convert the service back to an application.
- Once done, the system tray icon for WCG will go away, and the UD.EXE application will now be running as a Windows service, in the background.
To check that WCG is running as a task, bring up the Task Manager and look for the executable UD.EXE in the list shown in the Processes tab. If the service is running all the time (not just in screen saver mode), then also look for the executables UD_#####.EXE and WCG_xxx.EXE. The WCG_xxx.EXE process will be the high CPU consumer.
- Check for and remove the shortcut that might still exist in C:\Documents and Settings\username\Start Menu\Programs\Startup. The conversion script does remove it, but this for confirmation.
- Reboot just to be safe, as you can check that the service is auto-starting as it should, as a SYSTEM task.
- If you have enabled WCG to only run during screen saver then change the user’s screen saver back to something other than World Community Grid. If you don’t, then an annoying error message saying “another instance of WD.EXE is already active” will be displayed whenever the screen saver attempts to launch when the user is logged in. Also, the present results of the WCG application won’t show.
Issues
This option is very powerful, but also hinders easy access to viewing the WCG processing results as the system tray icon is gone. This also means that you can’t adjust any preferences as the interface is gone. Windows services don’t typically interact with the desktop so the only way to view the results is when the screen saver is active at the login window.
There is an option available for all services called Allow service to interact with desktop. With this enabled for the WCG service, in a high percentage of cases, you do get back the system tray icon for WCG. However, when you log out, the UD.EXE task along with the running work unit get killed. It is not recommended to enable this option.
Running WCG as a Windows service is not entirely without problems, thus why the World Community Grid people don't support or recommend it. It requires babysitting to ensure that WCG is actually running. Running as a service with the login window screen saver set to WCG, in a low percentage of cases you still only get the WCG text & logo when the WCG screen saver activates.
If you intend to use RDP (Remote Desktop), and the WCG service is configured to work only when the screen saver is active, you will get errors on the workstation window when the screen saver attempts to launch UD.EXE.
Email the author: Peter Schepers | Last updated: Dec 6, 2006