I am currently running [EMAIL="Folding@Home"]Folding@Home[/EMAIL] as a background service in Windows XP x64 edition, folding proteins with my unused cpu cycles. However, there are times when I would like to disable it, such as when I'm playing a game or doing something that could potentially conflict with it. Is there a way to temporarily pause / disable a service and then reenabling it? I don't really want to go into the Windows Task Manager and forcefully "crash" the thing by hitting End Process. Just to add, the processes already are set to low priority.

I think you can rightclick the icon and "Pause" it from there.

If the F@H process is really running as a service, there are two things you can do:

1. Open the Services utility in your Administrative Tools control panel and locate the F@H service. Double-clicking on the service name will open a Properties window within which you'll find Start/Stop/Pause buttons.

2. Copy the following into a new text file and name it something like FoldingToggle.bat (obviously replacing servicename with the actual name of the F@H service), and then put a shortcut to the batch file someplace convenient like your quickstart tray.
When run, the batch file will check the current state of the service and toggle it to the opposite state:

@echo off

sc interrogate [I]servicename[/I] | find "1062"
if %errorlevel%==0 goto :sc_start
sc stop [I]servicename[/I]
exit

:sc_start
sc start [I]servicename[/I]
exit

Awesome, Dave. I was able to pause it from within the Services tool. However, I am running a multi-processor machine, and, per the instructions on [EMAIL="Folding@Home's"]Folding@Home's[/EMAIL] website, am running a separate process for each CPU.

Can you give me the code for the batch file to stop and start multiple services at once?

TIA

Hey Dani,

My original response to your last question went POOF! when that *cough* power surge *cough* took out the database, so here it is again:

Are the F@H services just two separate instances of the same process, or are they actually two different services/processes (with two different names)? I'm not familiar with F@H running on MP machines, so any details that you can give me would help with the batch file.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.