By Ed Bott, Carl Siechert, and Craig Stinson(Adapted from Windows Vista Inside Out © 2007 Microsoft Corporation. To learn more about this book, visit the Microsoft Learning website.)
A SERVICE IS A SPECIALIZED PROGRAM that performs a function to support other programs. Many services operate at a very low level (by interacting directly with hardware, for example) and need to run even when no user is logged on; for this reason, they are often run by the System account (which has elevated privileges) rather than by ordinary user accounts. Windows Vista includes many of the same services as in previous versions of Windows but adds several new services as well.
In this article you’ll learn how to view the installed services; start, stop, and configure them; and install or remove them. We’ll also take a closer look at some of the services used in Windows Vista and show you how to configure them to your advantage. A new (and great, we might add) method for viewing services on your computer is through the Services tab of Task Manager. This article also looks at this new feature.
You manage services with the Services snap-in for Microsoft Management Console (MMC), shown below. To view this snap-in, type services.msc at a command prompt. (You must have administrator privileges to gain full functionality in the Services console. Running as a standard user, you can view service settings, but you can’t start or stop most services, change the startup type, or make any other configuration changes.)
The Extended and Standard views in the Services console (selectable by clicking a tab near the bottom of the window) have a single difference: The Extended view provides descriptive information of the selected service in the space at the left edge of the details pane. This space also sometimes includes links for starting, stopping, or pausing the selected service. Unless you need to constrain the console display to a small area of your screen, you’ll probably find the Extended view preferable to the Standard view.
The Services console offers plenty of information in its clean display. You can sort the contents of any column by clicking the column title, as you can do with other similar lists. To sort in reverse order, click the column title again. In addition, you can:
Start, stop, pause, resume, or restart the selected service, as described in the following section
Display the properties dialog box for the selected service, in which you can configure the service and learn more about it
Most of the essential services are set to start automatically when your computer starts, and the operating system stops them as part of its shutdown process. But sometimes you might need to manually start or stop a service. For example, you might want to start a seldom-used service on the rare occasion when you need it. (Because running services requires system resources such as memory, running them only when necessary can improve performance.) On the other hand, you might want to stop a service because you’re no longer using it. A more common reason, however, for stopping a service is because it isn’t working properly. For example, if print jobs get stuck in the print queue, sometimes the best remedy is to stop and then restart the Print Spooler service.
If a service allows pausing, try pausing and then continuing the service as your first step instead of stopping the service. Pausing can solve certain problems without canceling jobs in process or resetting connections.
Not all services allow you to change their status. Some prevent stopping and starting altogether, whereas others permit stopping and starting but not pausing and resuming. Some services allow these permissions to only certain users or groups. For example, most services allow only members of the Power Users and Administrators groups to start or stop them. Which status changes are allowed and who has permission to make them are controlled by each service’s discretionary access control list (DACL), which is established when the service is created on a computer.
To change a service’s status, select it in the Services console. Then click the appropriate link in the area to the left of the service list (if you’re using the Extended view and the link you need appears there). Alternatively, you can use the VCR-style controls in the toolbar, or right-click and choose the corresponding command.
Starts a service that isn’t running, or resumes a service that has been paused.
Stops a running service.
Pauses a running service. Pausing a service doesn’t remove it from memory; it continues to run at a level that varies depending on the service. With some services, pausing allows users to complete jobs or disconnect from resources but does not allow them to create new jobs or connections.
Stops a running service and then restarts it.
You can also change a service’s status by opening its properties dialog box and then clicking one of the buttons on the General tab. Taking the extra step of opening the properties dialog box to set the status has only one advantage: You can specify start parameters when you start a service using this method. This is a rare requirement.
To review or modify the way a service starts up or what happens when it doesn’t start properly, view its properties dialog box. To do that, simply double-click the service in the Services console. The picture below shows an example.
On the General tab of the properties dialog box (pictured above), you specify the startup type:
Automatic (Delayed Start) The service starts shortly after the computer starts in order to improve start up performance and user experience.
Automatic The service starts when the computer starts.
Manual The service doesn’t start automatically at startup, but it can be started by a user, a program, or a dependent service.
Disabled The service can’t be started.
You’ll find other startup options on the Log On tab of the properties dialog box, as shown below.
If you specify a logon account other than the Local System account, be sure that account has the requisite rights. Go to the Local Security Policy console (at a command prompt, type secpol.msc), and then go to Security Settings\Local Policies\User Rights Assignment and assign the Log on as a service right to the account.
For a variety of reasons—hardware not operating properly or a network connection down, for example—a service that’s running smoothly might suddenly stop. Settings on the Recovery tab of the properties dialog box, shown below, allow you to specify what should happen if a service fails.
You might want to perform a different action the first time a service fails than on the second or subsequent failures. The Recovery tab enables you to assign a particular response to the first failure, the second failure, and all subsequent failures, from among these options:
Take No Action The service gives up trying. In most cases, the service places a message in the event log. (Use of the event log depends on how the service was programmed by its developers.)
Restart the Service The computer waits for the time specified in the Restart Service After box to elapse and then tries to start the service.
Run a Program The computer runs the program that you specify in the Run Program box. For example, you could specify a program that attempts to resolve the problem or one that alerts you to the situation.
Restart the Computer Drastic but effective, this option restarts the computer after the time specified in the Restart Computer Options dialog box elapses. In that dialog box, you can also specify a message to be broadcast to other users on your network, warning them of the impending shutdown.
Many services rely on the functions of another service. If you attempt to start a service that depends on other services, Windows first starts the others. If you stop a service upon which others are dependent, Windows also stops those services. Before you either start or stop a service, therefore, it’s helpful to know what other services your action might affect. To obtain that information, go to the Dependencies tab of a service’s properties dialog box, shown below.
As you view the properties dialog box for different services, you might notice that the service name (shown at the top of the General tab) is often different from the name that appears in the Services console (the display name) and that neither name matches the name of the service’s executable file. (In fact, the executable for many services is either Services.exe or Svchost.exe.) The General tab shows all three names.
A detailed description of Svchost.exe appears in the Microsoft Knowledge Base article “A description of Svchost.exe in Windows XP Professional Edition.” The information is applicable to Windows Vista as well.
So how does this affect you? When you work in the Services console, you don’t need to know anything other than a service’s display name to find it and work with it. But if you use the Net command to start and stop services (as explained in the following section), you might find using the actual service name more convenient; it is often much shorter than the display name. You’ll also need the service name if you’re ever forced to work with a service’s registry entries, which can be found in the HKLM\System
\CurrentControlSet\Services\service subkey (where service is the service name).
And what about the executable name? You might need it if certain users have problems running a service; in such a case, you need to find the executable and check its permissions. Knowing the executable name can also be useful, for example, if you’re using Windows Task Manager to determine why your computer seems to be running so slowly. Although the Processes tab and the Services tab show the display name (under the Description heading), because of the window size it’s sometimes easier to find the more succinct executable name.
As mentioned earlier, you can find the actual name of each service and its executable name by looking at the General tab of the service’s properties dialog box. For your reference, Chapter 25 of Windows Vista Inside Out lists the names for all the services that are commonly installed with Windows Vista Ultimate.
The Services tab is a new addition to Task Manager in Windows Vista. Using the Services tab, you can start and stop services and view several important aspects of the services, both running and available, on your computer. You can also use this as a shortcut to the Services console.
Access Task Manager by right-clicking the taskbar and clicking Task Manager, by pressing CTRL+ALT+DELETE and clicking Start Task Manager, or by pressing CTRL+SHIFT+ESC. The Services tab is shown below.
To start or stop a service, right-click its name on the Services tab and then click Start Service or Stop Service.
Using the Services tab, you can also associate a running service with its process identifier (PID) and then further associate that PID with other programs and services being run under that PID. For example, the picture above shows several services running with PID 1008. Right-clicking one of the services with PID 1008 gives two options, one to stop the service and one called Go to Process. By clicking Go to Process, the Processes tab is opened with the particular process highlighted. This solves a problem whereby several processes with the same name might be running (such as Svchost.exe). Where it would've previously been difficult to associate a given service with its PID, the Services tab now makes this rather easy.
Most service-related processes run under an account other than your own and therefore aren't available when you attempt to use the Go to Process option. To view these processes, use the Show Processes From All Users option on the Processes tab in Task Manager before clicking Go to Process.
About the authors
Ed Bott is an award-winning journalist and one of the most recognized voices in the computing world. He’s been writing about Microsoft Windows and Microsoft Office for more than 15 years and is the author of nearly two dozen books.
Carl Siechert specializes in implementing and documenting operating system technologies. He has coauthored several Windows-related books including the popular Microsoft Windows XP Inside Out, Second Edition with Ed Bott and Craig Stinson.
Craig Stinson is a journalist and author. He has written or coauthored more than 20 books including Microsoft Windows XP Inside Out, Deluxe Edition, and Microsoft Office Excel 2007 Inside Out.
Have a comment for the authors? Enter your feedback using the tool below. (You'll see the comment box after you click one of the buttons.) Note that although the authors will read your feedback, personal replies are not possible due to the volume of feedback received.