I have scripted Svcs.bat to display the state, key, and Display Name of all services on your computer.

The syntax for running Svcs.bat is:


The output might begin with:

"RUNNING","ALG","Application Layer Gateway Service"
NOTE: Svcs.bat uses SC.exe, installed by default on Windows XP, Windows Vista, and Windows Server 2003, or installed from the Resource Kit on Window 2000.

Svcs.bat contains:

@echo off
sc query state= all | findstr /i "Service_Name Display_Name State" >"%TEMP%\svcs.tmp"
for /F "tokens=*" %%* in ('type "%TEMP%\svcs.tmp"') do call :Sub %%*
del /f /q "%TEMP%\svcs.tmp"
goto :EOF
set p1=%*
set p1=%p1:(=\[%
set p1=%p1:)=\]%
if /i %p1:~0,8%<h1><a name="Service__set_s2_p1_14_if_i_p1_0_8_">Service_ set s2="%p1:~14%"
if /i %p1:~0,8%</a></h1>Display_ set s3="%p1:~14%"
if /i %p1:~0,5%<h1><a name="State_set_s1_p1_24_if_i_p1_0_5_">State    set s1="%p1:~24%"
if /i %p1:~0,5%</a></h1>State echo %s1%,%s2%,%s3%