Querying Exsiting Windows Services with sc.exe Command

Q

How to use sc.exe command to query existing services?

✍: FYIcenter.com

A
If you want to query existing services, you can use the "query" commanded offered by the sc.exe tool. This tutorial shows how to use the "query" command.

Run sc.exe in a command window and do the following:

C:\>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

C:\>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
...

2007-01-01, 9908🔥, 0💬