• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Quick n' Dirty .bat file to stop/start FAH

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Wedo

Senior Kitty Power!
Joined
Oct 31, 2001
Location
Lost Angeles
Let's say you were brilliant enough to install FAH as a service so it runs 24/7 even when the computer is logged off but now you need an easy way to stop the service. I'm a team member of OCG (OverClocked Gamerz) and when ever I play a match I stop my service, turn off Anti-Virus, and pretty much stop every extra goody I have running. It probably does nothing to help, but I like to know that my computer is 100% focused on killing other people (virtually, of course).

Here are two .bat files I use, one that stops the service and another that starts it. Remember that a .bat file is just a document written in notepad and saved as SomeNameHere.bat.

You will need to know the exact name of your FAH service though. For most of the installations, it is probably FAH. However, for Dually and Quad installs you probably have FAH1, FAH2, etc.

This is my stop/start .bats for my dually which runs two instances. Copy/past the text that are between the ******** and save them as "Stop-FAH.bat" and "Start-FAH.bat" (or what ever you like). When you use the stop service it will take about 10 to 15 seconds to stop the service completely as the Core_XX.exe takes time to disengage.

Very Important! Do not start the service before it has completely stopped. This will cause WU corruption and your instance will just sit there with error messages in the log file. Check task manager to verify that the service has stopped prior to restarting.

*****Stop service bat*******

sc stop FAH1
sc stop FAH2

*************************

*****Start service bat*******

sc start FAH1
sc start FAH2

*************************

The "sc" calls on sc.exe (which should be in your \Windows\System32 directory, if not, get it here. The program is merely a command line services control program that enables you to manage services from the cmd window.

So again, if you have one instance running, just put one line input, such as "sc stop FAH."

Use this as a tool, but don't stop the service unless you need to as there are proteins to fold!

Wedo
 
Nice, IF I ever need to use it... but I have not run into a situation yet that folding effects my performance. Still nice to know though. Thanks Wedo.

Also, icase anyone doesn't know, there is a reg file for XP/2K to give you the services control panel right from a right click of my computer:
 

Attachments

  • services.jpg
    services.jpg
    15.3 KB · Views: 220
Sweet! :thup:

I just tried it on my 4xFAH dual Xeon rig and it works perfectly both ways. Sure beats going to run/services.msg & stopping/starting all 4 one at a time.

This sure was easy enough. You didn't need several long command lines either. This would work on any other nonessental service too I imagine.

Thanx Wedo.
 
sc is Microsoft's replacement for net, which is short for net use. The net use command was used for all kinds of NT based DOS stuff. sc.exe is striclty a services command line program.
 
Well since sc is better for services, it might be the best tool for FAH as a service. I'll have to try out Net on some other stuff. .bat files is about as close to programming as I'll get in windows. Maybe I'll learn how to write just for fun someday but with all the programming out sourcing to India, there's no real career path here in the USA like there was in the 90s.
 
Last edited:
More info taken from here.

How to Create a Windows Service Using Sc.exe
View products that this article applies to.
This article was previously published under Q251192
SUMMARY
To remotely create and start a service from the command line, you can use the SC tool (Sc.exe) included in the Resource Kit.

Although you can use the Netsvc.exe and Instsrv.exe tools to start a service on a remote computer, these tools do not give you the ability to remotely create a service.

NOTE: The Srvinstw.exe tool is the graphical user interface (GUI) version used to create remote services. Srvinstw.exe is not a command-line tool.
MORE INFORMATION
You can use Sc.exe to help develop services for Windows. Sc.exe, which is provided in the Resource Kit, implements calls to all of the Windows service control application programming interface (API) functions. You can set the parameters to these functions by specifying them on the command line. Sc.exe also displays service status and retrieves the values stored in the status structure fields. The tool also lets you specify the name of a remote computer so that you can call the service API functions or view the service status structures on the remote computer.

Wedo
 
Audioaficionado said:
with all the programming out sourcing to India, there's no real career path here in the USA like there was in the 90s.

Yeah. Tell me about it. :(
 
Back