eHow launches Android app: Get the best of eHow on the go.

How To

How to Turn On and Off Windows Services With a Batch File

Member
By Tollens
User-Submitted Article
(3 Ratings)

Windows services can really slow your computer down. They are enabled because Windows tries to help everyone, but you may not need everything. This article will show you how to create a batch file to set windows service so you can customize Windows to your experience.

Difficulty: Moderately Easy
Instructions

Things You'll Need:

  • Windows operating system
  1. Step 1

    Create a blank batch file:

    To do this, right click on your desktop, select New - Text Document. A file on the desktop will display with the name highlight as "New Text Document.txt", type over that to rename the file "test.bat".

    A popup will ask you if you are sure you want to change the file name extension, answer yes.

    Right click on test.bat again and select Edit. This will bring the file up in notepad where you can type in the commands to change the windows services.

  2. Step 2

    Open windows services: Click the Start button and Run, then type services.msc and click the ok button. This will open the windows services list. You can also open it by clicking the Administrative Tools in Control Panel and selecting Services. Now you should have the notepad up to edit the test.bat file and the Services List popup open.

  3. Step 3
     

    Enter the commands in the batch file: There are many things you can do with the services, but we will focus on turning a service on and off and also changing the startup type. For this example, we will be working with the "Index Services" service.

  4. Step 4
    This is what your test.bat file should look like to turn on
     
    This is what your test.bat file should look like to turn on "Indexing Service" and set the startup type to automatic.

    In the test.bat file that you have open, copy the following two lines and save the file. NET START "Indexing Service", sc config CiSvc start= auto. You can keep the notepad open. Double click the test.bat file on your desktop. This will start the index service and set the startup type to automatic.

  5. Step 5
    Display Name
     
    Display Name

    Getting the display name for NET START and NET STOP: Now that you have a very basic way to start a service and change the startup type on it. You will want to know how to do the same for other services. NET START can use either the 'service name' or the 'display name'. For our example, we used the display name because it makes reading test.bat file easier. To get the display name and service name, right click the service and select properties. In the picture you will see the display name circled and notice the service name above it. To stop the indexing service add this line in your test.bat file and double click test.bat to run it. NET STOP "Indexing Service"

  6. Step 6

    Changing the startup type for a service: You will notice that the CiSvc is used to configure the Startup Type. CiSvc is the service name for "Indexing Services". The service name is found above the display name when you right click a service and select properties.

    Adding this in your test.bat file will change the indexing service to have a startup type of automatic.

    sc config CiSvc start= auto

    To change this service to startup up manually, Add this line to the test.bat.

    sc config CiSvc start= demand


    There are other options for the startup type that can be found here:

    http://windowsitpro.com/article/articleid/37873/how-can-i-configure-a-services-start-up-type-from-the-command-line.html

  7. Step 7

    Turning on and off the right services: Now that you know the basics for turning a service on and off, it would be nice to know which services are safe to turn off. Here is a list of minimum services that are needed for gaming: http://www.tweakxp.com/article37562.aspx Here is a list of the bare minimum services that windows xp needs to operate properly. http://www.extremetech.com/article2/0,2845,1786007,00.asp

Tips & Warnings
  • Take a screen shot of all the services so you can set them back to their original state.
  • If you turn off a service that windows needs and the startup type is not set to automatic, then certain things might not work, like your internet or printer.
  • If you have disabled so much that you computer does not work properly, and you can not remember what your original settings were, then set all the startup types to automatic. Windows will turn on an automatic service if it is needed. This might start so many services that your computer is very slow again, but then you can experiment turning a service off at a time and seeing what happens.
  • Here again is the list of services that windows requires to have on: http://www.extremetech.com/article2/0,2845,1786007,00.asp
Subscribe

Post a Comment

Post a Comment

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Get Free Computers Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

eHow Computers
eHow_eHow Technology and Electronics