This table describes all the Windows services installed on a server.
Field name |
Data type |
Description |
id_snapshot |
number |
Identifier of the network snapshot. |
server_name |
string |
Netbios name of the server without the two preceding backslash characters. |
internal_name |
string |
Internal name of the service (used with the NET START and NET STOP syntax). |
display_name |
string |
Display string for the service (shown on the Services applet of the control panel). |
account_name |
string |
Windows NT complete user name of the service owner. You can link it to the account_name field of the users table. |
state |
number |
Specifies the current state of the service (see Appendix 1). |
type |
number |
Identifies the type of the service (see Appendix 2). |
startmode |
number |
Identifies the service starting (see Appendix 3) |
description |
string |
Description displayed in the service console |
ImagePath |
string |
Path to the service executable |
ServiceGroup |
string |
The service belong to this group |
Following are the constants used to identify the service state:
SERVICE_STOPPED = 0x1
SERVICE_START_PENDING = 0x2
SERVICE_STOP_PENDING = 0x3
SERVICE_RUNNING = 0x4
SERVICE_CONTINUE_PENDING = 0x5
SERVICE_PAUSE_PENDING = 0x6
SERVICE_PAUSED = 0x7
Symbolic constant |
Value |
Meaning |
SERVICE_WIN32_OWN_PROCESS |
0x00000010 |
A service type flag that indicates a Win32 service that runs in its own process. |
SERVICE_WIN32_SHARE_PROCESS |
0x00000020 |
A service type flag that indicates a Win32 service that shares a process with other services. |
SERVICE_KERNEL_DRIVER |
0x00000001 |
A service type flag that indicates a device driver. |
SERVICE_FILE_SYSTEM_DRIVER |
0x00000002 |
A service type flag that indicates a file system driver. |
SERVICE_INTERACTIVE_PROCESS |
0x00000100 |
A flag that indicates a Win32 service process that can interact with the desktop. |
Symbolic constant |
Value |
Meaning |
SERVICE_BOOT_START |
0x00000001 |
Specifies a device driver started by the system loader. This value is valid only if the service type is SERVICE_KERNEL_DRIVER or SERVICE_FILE_SYSTEM_DRIVER. |
SERVICE_SYSTEM_START |
0x00000002 |
Specifies a device driver started by the IoInitSystem function. This value is valid only if the service type is SERVICE_KERNEL_DRIVER or SERVICE_FILE_SYSTEM_DRIVER. |
SERVICE_AUTO_START |
0x00000003 |
Specifies a device driver or Win32 service started by the service control manager automatically during system startup. |
SERVICE_DEMAND_START |
0x00000004 |
Specifies a device driver or Win32 service started by the service control manager when a process calls the StartService function. |
SERVICE_DISABLED |
0x00000005 |
Specifies a device driver or Win32 service that can no longer be started. |
To view all the services started at boot time on the server \\MYSERVER , use the following SQL query:
SELECT * FROM services WHERE server_name = 'MYSERVER' AND startmode = 0x00000001