Windows service

From Wikipedia, the free encyclopedia

A Windows service is an application that starts when Windows is booted and runs in the background as long as Windows is running. It is very similar in concept to a Unix daemon.

Once a service is installed, its attributes can be modified by launching "Services" from the Windows Control Panel Administrative tools.

Windows provides an interface called the Service Control Manager that manages creating, deleting, 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|pause|... messages from the windows 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. In Windows Vista, users can also manipulate services through a simpler interface in MSConfig. [1]

Windows services by default are run as a virtual user: "LocalSystem" that has administrative rights on the system. The working directory will be the Windows system directory (typically C:\WINNT) and the default temp directory will typically be C:\WINNT\TEMP.

Since this is not a real user, this presents some challenges if user-specific data needs to be stored by the application, as there is no home directory for this user. LocalSystem also has no access to network file shares and similar resources; if a service needs to access files on the network, it generally needs to be configured to run as a domain user with access to those files.

Windows services can be set up to run as any user although running as a user other than the default requires storing a password. It is important to consider that as soon as the password is changed, the service will not run unless the password provided for the service is also changed.

When a service runs as LocalSystem, Windows allows the user to configure it so it is "allowed to interact with desktop" (that is, display user-visible dialog boxes and other windows). However, if running as any other user, this option is not available.

  • MSDN - Microsoft's MSDN Library Documentation on Services
  • INSTSRV.EXE - a Windows resource kit program that allows you to install an arbitrary application as a service
  • SrvAny/InstSrv Tutorial - SrvAny and InstSrv Tutorial with many Screenshots
Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.