This will require you to have admin rights on the desitnation machines:
Theres NO CMD or Command windows that the user will ever see with this process, all they could see is the process start and CPU util go up at night and then magicly stop and cpu go down in the morning.
This is a squence of bat files that work together to deploy the folding client. The assumptions are that you have the current DF files in a folder on your local machine (source) with handle.txt in it. do not put the local bat files in that folder, theres no reason to copy them to the client workstations. Only the custom bat files specified need to be copied.
Running Rcopy.bat and then List.bat is all thats needed to run this at scheduled times.
the bat file structure is like this:
rcopy.bat (located on my machine)
Code:
robocopy /e /v c:\source \\machine01\c$\destination\dir
This uses robocopy (the resource kit copy util) to deploy the prepared fold dir. The fold dir has the handle.txt in it, 2 custom bat files, and a file called service.org (we will cover these down the way). The fold dir should also have all the files from the current DF text client zip file. With robo copy if you make a change to a file like service.org or update the folding client software, just run rcopy.bat again and it will upload only the changed files to the workstations... saves LOTS of time when I was playing with startup/stopit.bat
List.bat (located on my machine)
Code:
call schedule.bat machinename01 >>c:\runlog.log
I have one entry like that for every machine so the one below it would say machinename02, etc... this passes the machine variable to the shcedule bat file and the >>c:\runlog.log writes log entries for the schedule process to the that file so I can see who got it and who didnt.
Schedule.bat (located on my machine)
Code:
at \\%1 7:30 c:\destination\dir\stopit.bat
at \\%1 17:30 c:\destination\dir\startup.bat
for weekends add on a "/next:monday" after the 7:30 for the stopit.bat This schedules onto each machine to start at 5:30pm and stop at 7:30am the next morning. You can schedule an entire week if you wanted using the "every" switch also.. I prefer to run these every morning on my own so I have some control over it.
startup.bat (on the folding machine, deployed with rcopy.bat)
Code:
c:
cd \destination\dir
foldtrajlite /remove
foldtrajlite /install
del service.cfg
copy service.org service.cfg
net start Foldtrajliteservice
This is what runs the folding. it forces the service to uninstall if its already there, re-installs it, and then because the reinstall makes a new service.cfg, we remove that and place in the premade one that was deployed with the folder. Then we fire up the service.
service.org (on the folding machine, deployed with rcopy.bat)
the useram variable is needed to get any serious folding performance
stopit.bat (on the folding machine, deployed with rcopy.bat)
Code:
net stop foldtrajliteservice
c:\destination\dir\foldtrajlite /remove
this stops the folding and removes the service leaving the dir on the machine ready to be run again.
That is that, thats all you need to run this.
To Remove the works here is what I use:
axelist.bat (located on my machine)
Code:
call axe.bat machinename01
axe.bat (located on my machine)
this removes all scheduled jobs on the destination machines
Removelist.bat (located on my machine)
Code:
call remove.bat machinename01
Remove.bat (located on my machine)
Code:
del /Q \\%1\c$\destination\dir\*.*
rmdir \\%1\c$\destination\dir
This removes the dir and any trace of it. I could make this smarter to make sure the service is stopped and removed first, but I havent yet.
So Thats th at... now you can go and push this to your corp network and schedule it to run only on off work hours. I think its VERY bad business to run this kind of stuff durring work hours as it could hurt your customers/coworkers productivity if theres an issue. I would recomend running this stuff only on non critical machines and only off hours.
I've refined this process over the last week and now have 66 machines scheduled nightly to be run for folding and all of them set to run all weekend. Its pretty bullet proof.