On
Microsoft WindowsMicrosoft Windows is a series of software operating systems and graphical user interfaces produced by Microsoft. Microsoft first introduced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces...
operating systemAn operating system is an interface between hardware and user which is responsible for the management and coordination of activities and the sharing of the resources of the computer that acts as a host for computing applications run on the machine. As a host, one of the purposes of an operating...
s, a
Windows service is a long-running executable that performs specific functions and which is designed not to require user intervention. Windows services can be configured to start when the operating system is
bootedIn computing, booting is a bootstrapping process that starts operating systems when the user turns on a computer system. A boot sequence is the initial set of operations that the computer performs when power is switched on...
and run in the background as long as Windows is running, or they can be started manually when required. They are similar in concept to a
UnixUnix is a computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...
daemonIn Unix and other computer multitasking operating systems, a daemon is a computer program that runs in the background, rather than under the direct control of a user; they are usually initiated as background processes...
. Many appear in the processes list in the
Windows Task ManagerWindows Task Manager is a task manager application included with Microsoft Windows NT family of operating systems that provides detailed information about computer performance and running applications, processes and CPU usage, commit charge and memory information, network activity and statistics,...
, most often with a username of
SYSTEM,
LOCAL SERVICE or
NETWORK SERVICE, though not all processes with the
SYSTEM username are services.
On
Microsoft WindowsMicrosoft Windows is a series of software operating systems and graphical user interfaces produced by Microsoft. Microsoft first introduced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces...
operating systemAn operating system is an interface between hardware and user which is responsible for the management and coordination of activities and the sharing of the resources of the computer that acts as a host for computing applications run on the machine. As a host, one of the purposes of an operating...
s, a
Windows service is a long-running executable that performs specific functions and which is designed not to require user intervention. Windows services can be configured to start when the operating system is
bootedIn computing, booting is a bootstrapping process that starts operating systems when the user turns on a computer system. A boot sequence is the initial set of operations that the computer performs when power is switched on...
and run in the background as long as Windows is running, or they can be started manually when required. They are similar in concept to a
UnixUnix is a computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...
daemonIn Unix and other computer multitasking operating systems, a daemon is a computer program that runs in the background, rather than under the direct control of a user; they are usually initiated as background processes...
. Many appear in the processes list in the
Windows Task ManagerWindows Task Manager is a task manager application included with Microsoft Windows NT family of operating systems that provides detailed information about computer performance and running applications, processes and CPU usage, commit charge and memory information, network activity and statistics,...
, most often with a username of
SYSTEM,
LOCAL SERVICE or
NETWORK SERVICE, though not all processes with the
SYSTEM username are services. The remaining services run through
svchost.exeIn the Windows NT family of operating systems, svchost.exe is the name of a process and its associated image for hosting services...
as DLLs loaded into memory.
Managing services
Once a service is installed, it can be managed by launching "Services" from the Windows
Control PanelThe Control Panel is a part of the Microsoft Windows graphical user interface which allows users to view and manipulate basic system settings and controls via applets, such as adding hardware, adding and removing software, controlling user accounts, and changing accessibility options...
→
Administrative Tools or typing "Services.msc" in the
Run command on
Start menuThe Start Menu and Start Button are user interface elements used in the X Windowing System and later versions of the Microsoft Windows operating systems...
. The "Services" management console provides a brief description of the service functions and displays the path to the service executable, its current status, startup type, dependencies and the account under which the service is running. It enables users to:
- Start, stop, pause or restart services.
- Specify service parameters.
- Change the startup type which includes Automatic, Manual and Disabled:
- Automatic starts the services at system logon,
- Manual starts a service as required or when called from an application (according to definition, but only some of the time in practice, depending on the service),
- Disabled completely disables the service and prevents it and its dependencies from running.
- Automatic (Delayed) is a new startup type introduced in Windows Vista, that starts the service a short while after the system has finished booting and initial busy operations, so that the system boots up faster.
- Change the account under which the service logs on.
- Configure recovery options upon service failure.
- Export the list of services as a text file or a CSV
A comma-separated values file is used for the digital storage of data structured in a table of lists form, where each associated item in a group is in association with others also separated by the commas of its set. Each line in the CSV file corresponds to a row in the table. Within a line,...
file.
In
Windows XPWindows XP is a line of operating systems produced by Microsoft for use on personal computers, including home and business desktops, laptops, and media centers. The name "XP" is short for "eXPerience"...
Service Pack 3 and
Windows VistaWindows Vista is a line of operating systems developed by Microsoft for use on personal computers, including home and business desktops, laptops, tablet PCs, and media center PCs...
, besides the
Services management console, users can manipulate services using
MSConfigMSConfig, or Microsoft System Configuration Utility, is a utility to troubleshoot the Windows startup process. It is bundled with all Microsoft Windows operating systems since Windows 98 except Windows 2000. Windows 95 and Windows 2000 users can download the utility as well, although it was not...
. The use of MSConfig to manage services, however, causes a prompt on the next startup. MSConfig can hide all operating system services for troubleshooting. Under Windows Vista, a
Services tab in
Windows Task ManagerWindows Task Manager is a task manager application included with Microsoft Windows NT family of operating systems that provides detailed information about computer performance and running applications, processes and CPU usage, commit charge and memory information, network activity and statistics,...
can be used to start or terminate a service or go to its process on the
Processes tab. Users can also use the
SC command in the command prompt.
Developing a Windows service
A
Windows Service is created using development tools such as CodeGear Delphi and
Microsoft Visual StudioMicrosoft Visual Studio is an Integrated Development Environment from Microsoft. It can be used to develop console and graphical user interface applications along with Windows Forms applications, web sites, web applications, and web services in both native code together with managed code for all...
. Windows provides an interface called the
Service Control ManagerThe Windows Service Control Manager is a remote procedure call server that manages creating, deleting, starting and stopping of Windows services...
that manages the starting and stopping of services. An application that wants to be a service needs to first be written in such a way that it can handle start, stop, and pause messages from the Service Control Manager. Then, in one or more
APIAn application programming interface is an interface in computer science that defines the ways by which an application program may request services from libraries and/or operating systems. An API determines the vocabulary and calling conventions the programmer should employ to use the services...
calls, the name of the service and other attributes such as its description are registered with the Service Control Manager. Although typically services do not have a user interface, developers can add
formIn component-based programming , a form is an easy way to create a GUI window. A form contains components and controls, which are a high-level representation of standard GUI widgets; it's easier to manipulate the high-level wrappers than to deal with the underlying API.At design time, you place...
s and other
UIThe user interface is the aggregate of means by which people—the users—interact with the system—a particular machine, device, computer program or other complex tool...
components. In this case, the "Allow service to interact with desktop" should be checked on the
Logon tab in the
Service properties dialog (though care should be taken with this approach as this can cause a security risk since any logged in user would be able to interact with the service).
See also
- Daemon (computer software)
In Unix and other computer multitasking operating systems, a daemon is a computer program that runs in the background, rather than under the direct control of a user; they are usually initiated as background processes...
- List of Windows Services
- Operating System Service Management
In computing, mechanisms and techniques for managing services often differ by operating system. Operating system service management can refer to the following:...
- Service Control Manager
The Windows Service Control Manager is a remote procedure call server that manages creating, deleting, starting and stopping of Windows services...
- Windows Service Hardening
- Service Wrapper
Java Service Wrapper is a software written in Java language which can be integrated with Java Applications running under Java Virtual Machine.It supports cross-platform.Java Service Wrapper can be integrated as...
External links