Index | Recent Threads | Unanswered Threads | Who's Active | Guidelines | Search |
World Community Grid Forums
Category: Retired Forums Forum: Member-to-Member Support [Read Only] Thread: WCG Service Converter - Easy Way to Run as a Service |
No member browsing this thread |
Thread Status: Active Total posts in this thread: 6
|
Author |
|
Former Member
Cruncher Joined: May 22, 2018 Post Count: 0 Status: Offline |
I was trying to get my installations of WCG as automated as possible, and while I wasn't able to get that part fully working, I did come up with this.
This is a .vbs script that will convert your installed WCG client to run as a service (and vice versa). Copy the code from below into notepad and save it as "WCGSvcCvt.vbs". Make an installation folder on your computer or on your network, and put the following files in that folder: SRVANY.EXE (from Windows 2000/XP Resource Kit) INSTSRV.EXE (from Windows 2000/XP Resource Kit) NIRCMD.EXE (from http://www.nirsoft.net/utils/nircmd.html) WCGSvcCvt.vbs (this file) Alter the "installFilesLoc" constant in the code to point to the folder containing those files. You can use a drive-letter path or a UNC path. Double-click the WCGSvcCvt.vbs to convert the locally-running WCG client to a service. Double-click again to convert back. Works on 2K and XP. Note: Running the WCG client (UD.EXE) as a service is not officially endorsed by WCG. However, I have it running as a service on several machines and they're running fine, and I have verified that they're downloading work units and processing them, and the results are appearing in my stats. Why would you want to run UD.EXE as a service? It will run no matter what user is logged on, including running even if no one is logged on, it no longer puts an icon in the system tray, and it allows remote control of the service from a management workstation via the W2K or WXP Computer Management application. Please note that because the UD.EXE client no longer has a user interface when running as a service (i.e. there is no way to bring up the WCG process window), there is no way you can watch the protein folding graphics nor see what the progress is of the current work unit. You will have to watch your stats on the member stats page to see how the program is working, and the stats only update every 24 hours.
|
||
|
Former Member
Cruncher Joined: May 22, 2018 Post Count: 0 Status: Offline |
Thanks, wilsondr. This is very helpful.
Out of curiosity, is there any unusual difficulty removing this software? I mean, if someone forgets to convert back from a service before trying to uninstall? Lawrence |
||
|
Former Member
Cruncher Joined: May 22, 2018 Post Count: 0 Status: Offline |
Out of curiosity, is there any unusual difficulty removing this software? I mean, if someone forgets to convert back from a service before trying to uninstall? If you did happen to do this (remove WCG before converting back from a service), the only after-effect would be an entry in the Event Log on every reboot that stated that the WCG service could not be started. If someone does this, the procedure to manually remove the service is: 1. Open regedit, find the key: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\WCG Delete the WCG key (and all subkeys). 2. Delete the file SRVANY.EXE from C:\Windows\System32\ 3. Restart your machine. |
||
|
RT
Master Cruncher USA - Texas - DFW Joined: Dec 22, 2004 Post Count: 2636 Status: Offline Project Badges: |
Excellent. I appreciate your contribution as I am sure many others do as well. I have seen this question asked dozens of times on this and other forums. Nice Work!
----------------------------------------As discussion threads get old and drift to the back of the forums, I would like to capture this posting and put it in a permanent place where people can reference it. With your permission, I will put it on a website that I have begun to construct for this purpose (http://www.UnofficialWorldCommunityGrid.com ) . You will be credited for it of course. Please let me know. If I remember correctly, you once said (forgive me if it was not you) If you still want to see the nice tray icon, go to Start>Settings>Control Panel>Administrative Tools then double-click services then rightclick on ud.exe and select Properites, then select the "Log On" tab, and check the "allow service to interact with desktop" Can that be added to the script? ---------------------------------------- [Edit 2 times, last edit by RT at Jan 19, 2005 1:46:52 PM] |
||
|
Former Member
Cruncher Joined: May 22, 2018 Post Count: 0 Status: Offline |
Yes, you can repost this script if you want. Please repost in it's entirety, with the text documentation.
No, I'm not the one tho talked about "allow service to interact with desktop", but I know what you're referring to. If you do check the "Allow service to interact with desktop" check box in the Log On tab of the service properties, you will get the icon in the system tray again, and can access the graphical interface of the application, even while it is running as a service. However, (at least on my system) this caused some odd delays and processor utilization, almost as if part of the process wasn't running at a low priority anymore. As far as modifying the VB script to set this option for you, I have not been able to find out if the service object I'm using exposes this property of the service, and therefore I don't currently have any way to set this option. I know the option can be set if you set up the service a different way (using WMI calls instead of the INSTSRV.EXE application and the objService object), but I didn't want to program all of the WMI necessary to install the service. It would have complicated the script considerably. |
||
|
RT
Master Cruncher USA - Texas - DFW Joined: Dec 22, 2004 Post Count: 2636 Status: Offline Project Badges: |
wilsondr.
----------------------------------------Please look at http://www.unofficialworldcommunitygrid.com/service.html and email me if you would like changes made. Thank You for all your work for the community. Kind Regards. |
||
|
|