Managing Services in Windows 7

Services are applications that run in the background. They can start up on boot or when required and can run independently of the logged on users. The main tools that you can use when managing services are the Services Console (Services.msc), the Task Manager, the Sc.exe command line utility, and Group Policies. To troubleshoot services during startup use the msconfig utility.

The services console lists all services and provides information about each service such as, logon details, state, etc. To start the Service consoles type services in the Start search text box and click the Services link under programs.

Right clicking any service gives you the capability to stop, start, restart, pause and resume that particular service, however, opening the Properties window will give you more control and information.

Apart from the service status, you get a brief description and the path to the executable. The properties window has four tabs:

The General tab allows you to set the startup condition, shows whether a service is currently started, and allows you to change its state and add startup parameters. When a service is set to Automatic, it starts at boot time while a Delayed Start (introduced with Windows 7) will delay a service for about 2 minutes after windows has started. Pay attention when setting services to Delayed Start as some applications may required the service immediately upon boot up, however, delaying non-critical services will enhance startup performance. Manual mode will start the service when needed. A Disabled state, means that the service will never start even if you try to start it manually!

The Logon tab allows you to specify a user account rather than using the Local System account for security reasons. It is safer to use restricted user accounts if the service does not require system privileges.

The Recovery tab specifies the actions that you take if a service fails. The Restart The Service and Restart The Computer actions allows you to set a time variable while the Run a Program action allows you to add scripts or other programs that should not require any user input when triggered. All of the above parameters are triggered when the service fails to start, however, if the service has started successfully and later encounters a problem and freezes! You can trigger the recovery actions by checking the Enable Actions for Stops With Errors option.

The Dependences tab lists all other services, system drivers and load order groups that this service depends on! Therefore, if this service is not running when it should be, make sure that all components that this service depends on, are running. Also, this tab shows a list of other services that depend on this service, so before stopping or disabling services make sure that you visit this tab!

Using The Task Manager

Since Windows Vista, Microsoft decided to add a services tab with Task Manager. Apart from retrieving valuable information about services, you can stop or start a service. The cool thing about task manager’s services tab is that now you can view the related process within which a service is running! Start Task Manager by right clicking anywhere on the taskbar and click Start Task Manager. Then click the Services tab.

You can stop or start a service through the right-click options, furthermore, you can click the Go To Process option and get additional info about the service such as, cpu and RAM usage. In fact, I find this very useful when troubleshooting services!

Using Group Policies

For network administrators the best tool would be Group Policies. A Policy setting for each system service can be found under:
Computer Configuration\Policies\Windows Settings\Security Settings\System Services

Using the sc.exe command

Sc.exe is a command line program used for communicating with the Service Control Manager and services. For a detailed list of options type sc /? at a command prompt. Most probably, sc.exe is the best tool to manage services; however, it is intended for advanced administrators. On the other hand, when it comes to query or retrieve information about services I suggest that you get familiar with this tool and use it!