Windows system service

from Wikipedia, the free encyclopedia

A Windows system service (even just a service or English Services ) is a program that as a specialized service in the background of Windows is running and functions of the operating system bundles to make them available to third parties. It is conceptually similar to the Unix daemon .

functionality

Windows system services form the “backbone” of Windows, so to speak, and often mediate between the hardware and software levels. A good example of this is the “ plug-and-play ” service: without this, neither applications could use the connected hardware (e.g. a mouse), nor could a device automatically log into the operating system. Through a so-called service contract (also known as interface specification), both hardware and software know in advance exactly how to address a service in order to use a certain functionality.

The actual implementation of the service depends on the environment (Windows version, 32- or 64-bit system, etc.), but the interfaces of the "Plug & Play" service are based on the principle on all Windows systems (from XP ) almost the same or at least backwards compatible .

Services do not communicate directly with the user, they do not have a user interface themselves . There are often separate programs for configuring and controlling a service; in Windows, most of these programs are combined in the Control Panel .

Windows provides the Service Control Manager services.exe , which manages the starting and stopping of services. He is a RPC - Server . Its user interfaces are the Microsoft Management Console and the command line interpreter cmd.exe. A program that is to be started as a service must be written in such a way that it can handle the commands of start|pause|continue|stopthe Service Control Manager .

As a rule, programs to be executed as a service are available as executable files . Programs in a dynamic link library are called via the executable file Svchost.exe( service host ), which loads, executes and terminates the services if necessary. A service can be started automatically when the operating system is started, started manually when requested by other programs, or it can be deactivated .

A service is installed by entering its name, executable file and other information in the registry . By default, services work as a local system with extensive access rights . However, they can also be set up so that they work under a user account or with minimal access rights as a network service or a local service.

installation

Services are installed and uninstalled by SetupAPI using * .INF scripts ; a newly installed service can be started, a running service can be stopped before the uninstallation.

administration

Services can be managed with the MMC Snap-In Services.msc . The command line tool sc.exe offers extended options such as creating, deleting and defining the dependencies of services . This has been included in the standard Windows installation since Windows XP or Windows Server 2003, but can also be installed later using the Resource Kit under other Windows versions .

Applications

Some basic system functions are provided by services. Such services are started automatically with the operating system regardless of the Windows variant.

Examples:

  • Workstation Service - enables clients to access a network
  • Automatic Updates - monitors Microsoft Update , downloads and installs updates
  • DHCP client - enables an IP address to be assignedautomatically
  • DNS client - finds the IP addresses for domain names, e.g. B. de.wikipedia.org
  • Print queue - the spooler that enables printing
  • Server - enables the spooler and files to be shared on the network
  • Task Scheduler - runs programs automatically at specific times
  • Plug and Play - monitors and supports hardware changes

Programs that are not included with Windows also regularly work as a service. Typical examples are:

literature

  • Axel Vahldiek, Christoph Hoppe: With a higher number of strokes. c't 17/2005 p. 102ff - with information on c't articles specifically for individual services
  • Threats and Countermeasures. Chapter 7: System Services. Microsoft TechNet, December 27, 2005 - with a description of a number of security-related services with a focus on Windows Server 2003
  • Axel Vahldiek: Under a false flag. Start programs without user login. c't 6/2004 p. 234ff - about starting any programs as a service

Individual evidence

  1. Service Control Manager . Microsoft. Retrieved April 8, 2009.
  2. Description of Svchost.exe under Windows 2000 , Microsoft MSKB
  3. Services that are turned off by default in Windows Server 2003 . Microsoft. Retrieved April 3, 2009.
  4. INF AddService Directive . Microsoft. Retrieved July 10, 2017.
  5. SetupInstallServicesFromInfSection function . In: MSDN . Microsoft. Retrieved July 10, 2017.
  6. SetupInstallServicesFromInfSectionEx function . In: MSDN . Microsoft. Retrieved July 10, 2017.
  7. http://support.microsoft.com/kb/251192/de Microsoft Help and Support