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. It is the Services and Controller app, services.exe, that launches all the services and manages their actions, such as start, end, etc. [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]
Windows administrators can manage services via:
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]
Developer(s) | Microsoft, ReactOS Contributors |
---|---|
Operating system | Windows, ReactOS |
Type | Command |
License | Windows: Proprietary commercial software ReactOS: GNU General Public License |
Website | docs |
The command-line tool to manage Windows services is sc.exe. It is available for all versions of Windows NT. [7] This utility is included with Windows XP [8] and later [9] and also in ReactOS.
The sc
command's scope of management is restricted to the local computer. However, starting with Windows Server 2003, not only can sc
do all that the Services snap-in does, but it can also install and uninstall services. [9]
The sc
command duplicates some features of the net
command. [10]
The ReactOS version was developed by Ged Murphy and is licensed under the GPL. [11]
Name | Description | Windows support | ReactOS support |
---|---|---|---|
query | Show service status | Yes | Yes |
queryex | Show extended service info (e.g. pid, flags) | Yes | Yes |
start | Start a service | Yes | Yes |
pause | Pause a service | Yes | Yes |
interrogate | Send an INTERROGATE control request to a service | Yes | Yes |
continue | Continue a service | Yes | Yes |
stop | Stop a service | Yes | Yes |
config | permanently change the service configuration | Yes | Yes |
description | Change a service description | Yes | Yes |
failure | Change the actions taken by a service upon failure | Yes | Yes |
failureflag | Yes | No | |
sidtype | Yes | No | |
privs | Yes | No | |
managedaccount | Yes | No | |
qc | Show the service config (e.g. dependencies, full path etc.) | Yes | Yes |
qdescription | Query a service description | Yes | Yes |
qfailure | Yes | No | |
qfailureflag | Yes | No | |
qsidtype | Yes | No | |
qprivs | Yes | No | |
qtriggerinfo | Yes | No | |
qpreferrednode | Yes | No | |
qmanagedaccount | Yes | No | |
qprotection | Yes | No | |
quserservice | Yes | No | |
delete | Delete a service | Yes | Yes |
create | Create a service | Yes | Yes |
control | Send a control to a service | Yes | Yes |
sdshow | Display a service's security descriptor using SDDL | Yes | Yes |
sdset | Sets a service's security descriptor using SDDL | Yes | Yes |
showsid | Yes | No | |
triggerinfo | Yes | No | |
preferrednode | Yes | No | |
GetDisplayName | Show the service DisplayName | Yes | Yes |
GetKeyName | Show the service ServiceKeyName | Yes | Yes |
EnumDepend | Show the service Dependencies | Yes | Yes |
boot | Yes | No | |
Lock | Yes | No | |
QueryLock | Yes | No | |
The following example enumerates the status for active services & drivers. [12]
C:\>sc query
The following example displays the status for the Windows Event log service. [12]
C:\>sc query eventlog
The Microsoft.PowerShell.Management PowerShell module (included with Windows) has several cmdlets which can be used to manage Windows services:
Windows also includes components that can do a subset of what the snap-in, Sc.exe and PowerShell do. The net
command can start, stop, pause or resume a Windows service. [21] 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.
Windows services are installed and removed via *.INF setup scripts by SetupAPI; an installed service can be started immediately following its installation, and a running service can be stopped before its deinstallation. [22] [23] [24]
For a program to run as a Windows service, the program needs to be written to handle service start, stop, and pause messages from the Service Control Manager (SCM) through the System Services API. SCM is the Windows component responsible for managing service processes.
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. [25]
In computing, at
is a command in Unix-like operating systems, Microsoft Windows, and ReactOS used to schedule commands to be executed once, at a particular time in the future.
A background process is a computer process that runs behind the scenes and without user intervention. Typical tasks for these processes include logging, system monitoring, scheduling, and user notification.
Windows Update is a Microsoft service for the Windows 9x and Windows NT families of the Microsoft Windows operating system, which automates downloading and installing Microsoft Windows software updates over the Internet. The service delivers software updates for Windows, as well as the various Microsoft antivirus products, including Windows Defender and Microsoft Security Essentials. Since its inception, Microsoft has introduced two extensions of the service: Microsoft Update and Windows Update for Business. The former expands the core service to include other Microsoft products, such as Microsoft Office and Microsoft Expression Studio. The latter is available to business editions of Windows 10 and permits postponing updates or receiving updates only after they have undergone rigorous testing.
Windows Management Instrumentation (WMI) consists of a set of extensions to the Windows Driver Model that provides an operating system interface through which instrumented components provide information and notification. WMI is Microsoft's implementation of the Web-Based Enterprise Management (WBEM) and Common Information Model (CIM) standards from the Distributed Management Task Force (DMTF).
In computing, kill
is a command that is used in several popular operating systems to send signals to running processes.
Command Prompt, also known as cmd.exe or cmd, is the default command-line interpreter for the OS/2, eComStation, ArcaOS, Microsoft Windows, and ReactOS operating systems. On Windows CE .NET 4.2, Windows CE 5.0 and Windows Embedded CE 6.0 it is referred to as the Command Processor Shell. Its implementations differ between operating systems, but the behavior and basic set of commands are consistent. cmd.exe is the counterpart of COMMAND.COM in DOS and Windows 9x systems, and analogous to the Unix shells used on Unix-like systems. The initial version of cmd.exe for Windows NT was developed by Therese Stowell. Windows CE 2.11 was the first embedded Windows release to support a console and a Windows CE version of cmd.exe. The ReactOS implementation of cmd.exe is derived from FreeCOM, the FreeDOS command line interpreter.
Messenger service is a network-based system notification Windows service by Microsoft that was included in some earlier versions of Microsoft Windows.
In computing, CHKDSK
is a system tool and command in DOS, Digital Research FlexOS, IBM/Toshiba 4690 OS, IBM OS/2, Microsoft Windows and related operating systems. It verifies the file system integrity of a volume and attempts to fix logical file system errors. It is similar to the fsck
command in Unix and similar to Microsoft ScanDisk, which co-existed with CHKDSK
in Windows 9x and MS-DOS 6.x.
Windows Preinstallation Environment is a lightweight version of Windows used for the deployment of PCs, workstations, and servers, or troubleshooting an operating system while it is offline. It is intended to replace MS-DOS boot disks and can be booted via USB flash drive, PXE, iPXE, CD, DVD, or hard disk. Traditionally used by large corporations and OEMs, it is now widely available free of charge via Windows Assessment and Deployment Kit (WADK).
In computing, SUBST
is a command on the DOS, IBM OS/2, Microsoft Windows and ReactOS operating systems used for substituting paths on physical and logical drives as virtual drives.
In computing, regsvr32
is a command-line utility in Microsoft Windows and ReactOS for registering and unregistering DLLs and ActiveX controls in the operating system Registry. Despite the suffix "32" in the name of the file, there are both 32-bit and 64-bit versions of this utility. regsvr32
requires elevated privileges.
The Windows Boot Manager (BOOTMGR
) is the bootloader provided by Microsoft for Windows NT versions starting with Windows Vista and Windows Server 2008. It is the first program launched by the BIOS or UEFI of the computer and is responsible for loading the rest of Windows. It replaced the NTLDR present in older versions of Windows.
The Client/Server Runtime Subsystem, or csrss.exe
, is a component of the Windows NT family of operating systems that provides the user mode side of the Win32 subsystem. In modern versions of Windows, it is primarily involved with process and thread management, console window handling, side-by-side assembly loading and the shutdown process. Historically, it had also been responsible for window management and graphics rendering, however, these operations have been moved to kernel mode starting with Windows NT 4.0 to improve performance.
Microsoft Drive Optimizer is a utility in Microsoft Windows designed to increase data access speed by rearranging files stored on a disk to occupy contiguous storage locations, a technique called defragmentation. Microsoft Drive Optimizer was first officially shipped with Windows XP.
Quick Assist is a Microsoft Windows feature that allows a user to view or control a remote Windows computer over a network or the Internet to resolve issues without directly touching the unit. It is based on the Remote Desktop Protocol (RDP). It is complemented by Get Help, a feature introduced in Windows 10 that enables the user to contact Microsoft directly but does not allow for remote desktoping or screen sharing.
Windows Vista contains a range of new technologies and features that are intended to help network administrators and power users better manage their systems. Notable changes include a complete replacement of both the Windows Setup and the Windows startup processes, completely rewritten deployment mechanisms, new diagnostic and health monitoring tools such as random access memory diagnostic program, support for per-application Remote Desktop sessions, a completely new Task Scheduler, and a range of new Group Policy settings covering many of the features new to Windows Vista. Subsystem for UNIX Applications, which provides a POSIX-compatible environment is also introduced.
Task Scheduler is a job scheduler in Microsoft Windows that launches computer programs or scripts at pre-defined times or after specified time intervals. Microsoft introduced this component in the Microsoft Plus! for Windows 95 as System Agent. Its core component is an eponymous Windows service. The Windows Task Scheduler infrastructure is the basis for the Windows PowerShell scheduled jobs feature introduced with PowerShell v3.
To shut down or power off a computer is to remove power from a computer's main components in a controlled way. After a computer is shut down, main components such as CPUs, RAM modules and hard disk drives are powered down, although some internal components, such as an internal clock, may retain power.
In computing, diskpart
is a command-line disk partitioning utility included in Windows 2000 and later Microsoft operating systems, replacing its predecessor, fdisk. The command is also available in ReactOS.
In computing, net
is a command in IBM OS/2, Microsoft Windows, ReactOS and Greentea OS used to manage and configure the operating system from the command-line. It is also part of the IBM PC Network Program for DOS.
The service CmdAsSystem is configured as interactive whose support is being deprecated. The service may not function properly. The problem is that this script tries to create and start an interactive service. Interactive services will not function correctly due to Session 0 Isolation in Windows Vista.
{{cite web}}
: CS1 maint: postscript (link)Windows 7, Windows 8, Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Vista