In tip 0324, I casually mentioned (and linked) to the drv and svc freeware that can accomplished the subject actions.

The usage of drv is:

<b>
usage: drv \[-acdhlLpst?\] \[-m Server\] \[Driver\] \[Driver Arguments\]

  Options:
    a  - List all drivers.
    c  - Continue, (Restart), the specified driver.
    d  - List detailed information about the specified driver.
    h  - Help, (this).
    l  - List active drivers.
    L  - List inactive drivers.
    p  - Pause the specified driver.
    s  - Start the specified driver.
    t  - Stop the specified driver.
    ?  - Usage.
    m  - Specify a Server to act on.

    Driver -
    The driver to start, stop, pause or continue. This is the Driver
    name, not the Driver Display Name.

    Driver Arguments-
    The arguments to pass to the driver, (Start only).

With no arguments, drv lists the started drivers on the local system. If
only a driver name is specified, then the status of that driver is
displayed.</b>
The usage of svc is:
<b>usage: svc \[-acdhlLpst?\] \[-m Server\] \[Service\] \[Service Arguments\]

  Options:
    a  - List all services.
    c  - Continue, (Restart), the specified service.
    d  - List detailed information about the specified service.
    h  - Help, (this).
    l  - List active services.
    L  - List inactive services.
    p  - Pause the specified service.
    s  - Start the specified service.
    t  - Stop the specified service.
    ?  - Usage.
    m  - Specify a Server to act on.

    Service -
    The service to start, stop, pause or continue. This is the Service
    name, not the Service Display Name.

    Service Arguments-
    The arguments to pass to the service, (Start only).

With no arguments, svc lists the started services on the local system. If
only a service name is specified, then the status of that service is
displayed.</b>
The only difficulty with these routines is that they do not set %ERRORLEVEL%, so testing the State: of a driver or service is not easy. Here is drvsvc.bat which will set %ERRORLEVEL%:

Usage: drvsvc program object \[computer\]

where:

program is drv or svc (or the full path name).

object is the driver or service whose State: you wish to translate.

computer is the optional computer name of a remote computer where the object resides.

drvsvc.bat contains:

<b>@echo off
if "%3"<h1><a name="_goto_local_FOR_F_Tokens_2_Delims_i_in_1_m_3_2_do_set_state_i_goto_test_local_FOR_F_Tokens_2_Delims_i_in_1_2_do_set_state_i_test_set_ERRORLEVEL_4_if_i_state_">"" goto local
FOR /F "Tokens=2 Delims=- " %%i in ('%1 -m %3 %2') do set state=%%i
goto test
:local
FOR /F "Tokens=2 Delims=- " %%i in ('%1 %2') do set state=%%i
:test
set ERRORLEVEL=4
if /i "%state%"</a></h1>"Running" set ERRORLEVEL=1&goto end
if /i "%state%"<h1><a name="_Stopped_set_ERRORLEVEL_2_amp_goto_end_if_i_state_">"Stopped" set ERRORLEVEL=2&goto end
if /i "%state%"</a></h1>"Paused" set ERRORLEVEL=3
:end</b>
NOTE: The state environment variable is also returned.