World Library  
Flag as Inappropriate
Email this Article

Windows service

Article Id: WHEBN0005034169
Reproduction Date:

Title: Windows service  
Author: World Heritage Encyclopedia
Language: English
Subject: Features new to Windows XP, Windows Task Scheduler, Service Control Manager, Windows Registry, Active Directory
Collection: Process (Computing), Windows Services
Publisher: World Heritage Encyclopedia

Windows service

In Windows NT operating systems, a Windows service is a computer program that operates in the background.[1] It is similar in concept to a Unix daemon.[1] A Windows service must conform to the interface rules and protocols of the Service Control Manager, the component responsible for managing Windows services.[2]

Windows services can be configured to start when the operating system is started and run in the background as long as Windows is running. Alternatively, they can be started manually or by an event. Windows NT operating systems include numerous services which run in context of three user accounts: System, Network Service and Local Service. These Windows components are often associated with Host Process for Windows Services. Because Windows services operate in the context of their own dedicated user accounts, they can operate when a user is not logged on.

Prior to Windows Vista, services installed as an "interactive service" could interact with Windows desktop and show a graphical user interface. In Windows Vista, however, interactive services are deprecated and may not operate properly, as a result of Windows Service hardening.[3][4]


  • Administration 1
    • Services snap-in 1.1
    • Sc.exe 1.2
    • Windows PowerShell 1.3
    • Other management tools 1.4
  • Development 2
  • See also 3
  • References 4
  • Further reading 5


Windows administrators can manage services via:

Services snap-in

The Services snap-in, built upon Microsoft Management Console, can connect to the local computer or a remote computer on the network, enabling users to:[1]

  • view a list of installed services along with service name, descriptions and configuration
  • start, stop, pause or restart services[5]
  • specify service parameters when applicable
  • change the startup type. Acceptable startup types include:
    • Automatic: The service starts at system logon.
    • Automatic (Delayed): The service starts a short while after the system has finished starting up. This option was introduced in Windows Vista in an attempt to reduce the boot-to-desktop time. However, not all services support delayed start.[6]
    • Manual: The service starts only when explicitly summoned.
    • Disabled: The service is disabled. It will not run.
  • change the user account context in which the service operates
  • configure recovery actions that should be taken if a service fails
  • inspect service dependencies, discovering which services or device drivers depend on a given service or upon which services or device drivers a given service depends
  • export the list of services as a text file or as a CSV file


The command-line peer of the Services snap-in is Sc.exe, the "Service Control" utility.[7] This utility is included with Windows XP[8] and later.[9]

Sc.exe's scope of management is restricted to the local computer. However, starting with Windows Server 2003, not only can Sc.exe do all that the Services snap-in does, but it can also install and uninstall services.[9]

Windows PowerShell

Windows PowerShell can intrinsically manage Windows services via the following cmdlets:

  • Get-Service[10]
  • New-Service[11]
  • Restart-Service[12]
  • Resume-Service[13]
  • Set-Service[14]
  • Start-Service[15]
  • Stop-Service[16]
  • Suspend-Service[17]

Other management tools

In addition to the snap-in, Sc.exe and PowerShell, Windows also includes components that can do a subset of what the trio can do. Net.exe can start, stop, pause or resume a Windows service.[18] In Windows Vista and later, Windows Task Manager can show a list of installed services and start or stop them. MSConfig can enable or disable (see startup type description above) Windows services.


A Windows service is created using development tools such as Microsoft Visual Studio or Embarcadero Delphi. In order to be a Windows service, a program needs to be written in such a way that it can handle start, stop, and pause messages from the Service Control Manager. Service Control Manager is a component of Windows which is responsible for starting and stopping services.

The Windows Resource Kit for Windows NT 3.51, Windows NT 4.0 and Windows 2000 provides tools to control the use and registration of services: SrvAny.exe acts as a service wrapper to handle the interface expected of a service (e.g. handle service_start and respond sometime later with service_started or service_failed) and allow any executable or script to be configured as a service. Sc.exe allows new services to be installed, started, stopped and uninstalled.[19]

See also

Windows services


  1. ^ a b c "Services overview".  
  2. ^ "Services".  
  3. ^ "New Elevation PowerToys for Windows Vista". TechNet Magazine.  
  4. ^ "Services in Windows".  
  5. ^ "Start, stop, pause, resume, or restart a service".  
  6. ^ "ServiceInstaller.DelayedAutoStart Property (System.ServiceProcess)". Microsoft. Retrieved April 2013See Remarks section 
  7. ^ "How to create a Windows service by using Sc.exe". Support. Microsoft. 11 September 2011. Retrieved 29 March 2013. 
  8. ^ "Command-line reference A-Z: SC".  
  9. ^ a b "Command-Line Reference: Sc".  
  10. ^ "Get-Service". TechNet. Microsoft. Retrieved 29 March 2013. 
  11. ^ "New-Service". TechNet. Microsoft. Retrieved 29 March 2013. 
  12. ^ "Restart-Service". TechNet. Microsoft. Retrieved 29 March 2013. 
  13. ^ "Resume-Service". TechNet. Microsoft. Retrieved 29 March 2013. 
  14. ^ "Set-Service". TechNet. Microsoft. Retrieved 29 March 2013. 
  15. ^ "Start-Service". TechNet. Microsoft. Retrieved 29 March 2013. 
  16. ^ "Stop-Service". TechNet. Microsoft. Retrieved 29 March 2013. 
  17. ^ "Suspend-Service". TechNet. Microsoft. Retrieved 29 March 2013. 
  18. ^ "Start, stop, pause, resume, or restart a service".  
  19. ^ "How To Create a User-Defined Service". Support. Microsoft. Retrieved 29 March 2013. 

Further reading

  • Savill, John (5 March 1999). "What are the ErrorControl, Start and Type values under the Services subkeys?".  
  • David B. Probert, Windows Service Processes
  • Windows Sysinternals: Autoruns for Windows v13.4—An extremely detailed query of services
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.