Categories:
Administration (161)
Adware Spyware (43)
Apache (20)
Bluetooth (127)
DOS Commands (2)
Edge (28)
General (5)
Internet Connection (21)
Internet Explorer (224)
Media Center (14)
Media Player (135)
Mozilla Firefox (22)
MS Access (9)
Performance (204)
PHP (25)
Programming (36)
Security (109)
Silverlight (22)
Tips (144)
Tools (312)
Tutorials (39)
Windows 10 (168)
Windows 7 (1411)
Windows 8 (1712)
Windows Phone (33)
Windows Server 2008 (165)
Windows Server 2012 (84)
Windows Server 2016 (23)
Windows Vista (71)
Windows XP (23)
Collections:
Other Resources:
Service Controller 'sc query' Command on Windows 7
How to use Service Controller "sc query" command to query statuses of services on Windows 7?
✍: FYIcenter.com
Service Controller "sc query" command can be used to query the status of a single service,
a group of services, or all services on Windows 7 system.
Microsoft provides the following description and examples:
QUERY and QUERYEX OPTIONS: If the query command is followed by a service name, the status for that service is returned. Further options do not apply in this case. If the query command is followed by nothing or one of the options listed below, the services are enumerated. type= Type of services to enumerate (driver, service, all) (default = service) state= State of services to enumerate (inactive, all) (default = active) bufsize= The size (in bytes) of the enumeration buffer (default = 4096) ri= The resume index number at which to begin the enumeration (default = 0) group= Service group to enumerate (default = all groups) SYNTAX EXAMPLES sc query - Enumerates status for active services & drivers sc query eventlog - Displays status for the eventlog service sc queryex eventlog - Displays extended status for the eventlog service sc query type= driver - Enumerates only active drivers sc query type= service - Enumerates only Win32 services sc query state= all - Enumerates all services & drivers sc query bufsize= 50 - Enumerates with a 50 byte buffer sc query ri= 14 - Enumerates with resume index = 14 sc queryex group= "" - Enumerates active services not in a group sc query type= interact - Enumerates all interactive services sc query type= driver group= NDIS - Enumerates all NDIS drivers
Example 1: "sc query themes" command queries the status of "themes" service on the local system:
C:\Users\fyicenter>sc query themes SERVICE_NAME: themes TYPE : 20 WIN32_SHARE_PROCESS STATE : 4 RUNNING (STOPPABLE,NOT_PAUSABLE,ACCEPTS_ WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0
Example 2: "sc query" command queries statuses of all services on the local system:
C:\Users\fyicenter>sc query SERVICE_NAME: CryptSvc DISPLAY_NAME: Cryptographic Services TYPE : 20 WIN32_SHARE_PROCESS STATE : 4 RUNNING (STOPPABLE,NOT_PAUSABLE,ACCEPTS_ WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0 SERVICE_NAME: Dhcp DISPLAY_NAME: DHCP Client TYPE : 20 WIN32_SHARE_PROCESS STATE : 4 RUNNING (STOPPABLE,NOT_PAUSABLE,ACCEPTS_ WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0 ...
⇒ Dumping All Running Services on Windows 7
⇐ Run 'sc.exe' Service Controller Command on Windows 7?
2016-07-06, 1487👍, 0💬
Popular Posts:
Where to find information about what services are running on Windows 8 and how to manage them? I wan...
Why my Windows XP generates a PIN code for Bluetooth connection? If you try to connect to a new Blue...
How to stop a Windows XP service getting started automatically at system startup time, or disabling ...
What files are stored in the "C:\Users\<userid >\AppData\Local\M icrosoft\Windows\Tempor. ..
How do I get the latest version of Windows Defender? If you installed Windows AntiSpyware (Beta) pri...