- Windows service
On
Microsoft Windows operating system 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 booted 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 aUnix daemon. Many appear in the processes list in theWindows Task Manager , 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 throughsvchost.exe as DLLs loaded into memory.Managing services
Once a service is installed, it can be managed by launching "Services" from the Windows Control Panel → "Administrative Tools" or typing "Services.msc" in the "Run" command on
Start menu . 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 file.In
Windows XP andWindows Vista , besides the "Services" management console, users can manipulate services usingMSConfig . 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 inWindows Task Manager 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
Microsoft Visual Studio andBorland Delphi . Windows provides an interface called theService Control Manager 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 API 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 forms and other UI components. In this case, the "Allow service to interact with desktop" should be checked on the "Logon" tab in the "Service properties" dialog.ee also
*
Windows Service Hardening
*Service Control Manager
*Operating system service management
*Daemon (computer software) External links
* [http://msdn2.microsoft.com/en-us/library/ms685141.aspx Microsoft Developer Network - Services]
* [http://support.microsoft.com/default.aspx?scid=kb;en-us;137890 INSTSRV.EXE] - a Windows NT resource kit program that allows you to install an arbitrary application as a service
* [http://www.blackviper.com Black Viper] - custom services configuration website
Wikimedia Foundation. 2010.