If you know the Display Name of the service that must be started, you can conditionally start a service based upon the started status of another service by using the following commands:

<font size="1">for /f "Tokens=*" %%a in ('net start^|Find /i "Display Name of Service that must already be started"') do (
  net start "Display name or short name of the service you wish to start"
)</font>
If you are not sure that you have the Display Name or the service short name, its' registry key, use CSSvc.bat. The syntax for using CSSvc.bat is:

CSSvc StartSvc IfSvc OK

Where:

<b>StartSvc</b> is the short or <b>Display Name</b> of the service you wish to start.

<b>IfSvc</b>    is the short or <b>Display Name</b> of the service that must already be started.

<b>OK</b>       is a <a href="/article/tips/tip.aspx?id=5535">call directed environment variable</a> that will contain:
         <b>Y</b> if <b>StartSvc</b> was successfully started.
         <b>N</b> if <b>StartSvc</b> failed to start, or if a service was not found, or if <b>StartSvc</b> EQUAL <b>IfSvc</b>.
         <b>A</b> if <b>StartSvc</b> was already started.
NOTE: CSSvc.bat uses SvcDnSnRpt.bat, which must be located in a folder that is in your PATH.

CSSvc.bat contains:

@echo off
setlocal EnableDelayedExpansion
if \{%3\}==\{\} goto err1
set StartSvc=%1
set IfSvc=%2
set SS=N
set IS=N
set StartSvc="%StartSvc:"=%"
set IfSvc="%IfSvc:"=%"
for /f "Tokens=1* Delims=," %%s in ('SvcDnSnRpt') do (
 If /i !StartSvc! EQU %%s set SS=Y
 If /i !StartSvc! EQU %%t set SS=Y&set StartSvc=%%s
 If /i !IfSvc! EQU %%s set IS=Y
 If /i !IfSvc! EQU %%t set IS=Y&set IfSvc=%%s
)
if "%SS%" EQU "N" goto  err3
if "%IS%" EQU "N" goto  err4
if /i %StartSvc% EQU %IfSvc% goto err2
set OK=N
for /f "Tokens=*" %%a in ('net start^|find /i %StartSvc%') do (
 set OK=A
)
if "%OK%" EQU "A" goto AOK
for /f "Tokens=*" %%a in ('net start^|Find /i %IfSvc%') do (
  call :quiet>nul 2>&1
)
if %ERRORLEVEL% EQU 0 set OK=Y
:AOK
endlocal&set %3=%OK%
goto :EOF
:err1
@echo Syntax: CSSvc StartSvc IfSvc OK
endlocal
goto :EOF
:err2
@echo Syntax: CSSvc -  %StartSvc%=%IfSvc%
endlocal&set %3=N
goto :EOF
:err3
@echo Syntax: CSSvc -  %StartSvc% not found.
endlocal&set %3=N
goto :EOF
:err4
@echo Syntax: CSSvc -  %IfSvc% not found.
endlocal&set %3=N
goto :EOF
:quiet
net start %StartSvc%