|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Foldin' For PCMech!
|
General programming help... ideas
This isn't specific to any one language as of yet, but most likely it will be C++. I, and many others i'm sure, am having a problem with the folding@home program and would like to write a program to fix this problem.
BACKGROUND: When folding installs it requests a unique user ID from the Stanford servers and stores this ID in the registry. Each computer on running FAH has its own ID. In a place such as a school where machines are ghost rather than re-installing XP this causes a problem. When a machine is ghost to another you then have 2 machines with the same ID and also the same work unit. This throws things out of wack a little, the points get messed up and you endup not helping the cause at all. After time and many many ghostings all the machines ahve the same ID and all look like 1 computer to Stanford and in turn only do the work of a single computer. The simply solution is to delete the ID each time the system is ghost but this takes time and is a pain to do. _________________ Here is my idea for a program to solve this. Make a program that will save the computer name to a text file then run each time the computer boots up. The program will then compare the current computer name to the one on file, if they match the program exits if they don't it deletes the ID from reg and restarts the folding client allowing it to download a new one from Stanford. My thinking is that when you ghost a computer one of the 2 computers has to have its name changed because you can't have 2 of the same name on one network, thus the name change would indicate the machine has been ghost. Do I have the right idea? Is it possible to do? Would it work? Remember that I am not very good at C++, I took C++ 1 and 2 in high school (10th grade i think it was) but thats the only time I have really messed with it. thanks for the input! |
|
|
|
|
|
#2 |
|
Come in Ray...
Join Date: Sep 2004
Posts: 1,668
|
Yes it would work. I believe, however, the ID is stored in the config file, not the registry... this would make it even easier. The only problem would be accessing the files via the network, are you using EM to monitor the clients? If so, simply read the config file from your shares, otherwise you will either have to manually set up a share (which makes no sense) or have the share built into the image (probably not likely).
I'm not sure how you would restart a service on a remote computer. You could make a batch file and copy it to the target computer which restarts using the NET command, but actually getting the target to execute it would take some research (if you know how, I would love to know). I would use VB, much easier and very well suited for "simple" tasks like this. |
|
|
|
|
|
#3 |
|
Foldin' For PCMech!
|
The UserID is actually stored in the reg (HKEY_LOCAL_MACHINE>SOFTWARE>PandeGroup>Folding@home>UserID) and is not the same as the UserName which is saved in the config file. This ID is different on every folding machine out there, or should be. It is what keep track of how many CPUs a user has among other bits of info if I remember right.
I'm not sure you understand what I'm looking at doing. I thought about doing a network program but that would just use more of the bandwidth and be slower. I want this program to be on each machine, in the FAH folder or something, and run on its own machine on bootup. Here is an example of what it will do: we have 2 computers, Computer A and Computer B. Both running FAH and the "UserID" program. Each with its own UserID saved in reg. The UserID program runs on each machine and saves its name to a txt file. Computer B gets a bad virus and it is decided to ghost Com. A onto Com. B rather than re-install of XP. We now have Computer A and Computer A(b) but this causes a problem because you can't have two computers with the same name on the same network so we change Com. A(b) to Com. C giving us Com. A and COm. C on the network. UserID program runs and notices the change in name on Com. C, stops the FAH service, deletes the UserID reg entry and restarts the FAH service which then downloads a new UserID. Understand a little better? Sorry for the confussuion. |
|
|
|
|
|
#4 |
|
Come in Ray...
Join Date: Sep 2004
Posts: 1,668
|
Ah I see now.
Yes, this is easily done. VB (.NET would be best) will be quite well suited for this project as it has built in functions for getting registry and system variables. You could just set it as a startup program and use the NET STOP and NET START commands to handle your F@H service. |
|
|
|
|
|
#5 |
|
Foldin' For PCMech!
|
ok, I have a copy of MS Visual Studio 6.0 which is what I did my C++ with. It has VB in with it I think, could I use that? Also, I have never used VB before so could you link me to a good online tutorial?
|
|
|
|
|
|
#6 |
|
Come in Ray...
Join Date: Sep 2004
Posts: 1,668
|
If you are more comfortable with C++, use that. Any MS product is going to be best for pulling MS OS variables. I haven't used VB6 in a while, but any problems I encountered I just googled "VB6 [insert problem]." What you are going to be doing is beyond a beginner's tutorial, so I would suggest just using C++ and "research" using the same method I did.
The MS online library will probably be your best resource: http://msdn.microsoft.com/library/ |
|
|
|
|
|
#7 |
|
Foldin' For PCMech!
|
Ok, thanks for the help! I guess I'll be using C++ then, I had a C++ 1 and 2 class a few years ago in high school but other than that never messed with it too much. Never even touched VB. :\
I'll have to wait for my mom to ship me my computer so it will be awhile before I can even work on this, I'm just gathering info for now. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|