Microsoft KB Archive/320907

= INFO: Starting and Stopping Services from the Command Prompt =

Article ID: 320907

Article Last Modified on 12/27/2003

-

APPLIES TO


 * Microsoft Windows CE .NET 4.2

-



This article was previously published under Q320907



SUMMARY
Windows CE .NET includes a services loader that loads and manages various server applications. You can access this services subsystem three ways: programmatically, through the registry, and from the command prompt. This article contains more information about using services from the command prompt on Windows CE .NET.



MORE INFORMATION
You can run the Services.exe program from the command prompt by using the following format:

services [flags] [command [service]]

Commands

 * help - print a short description of the commands that help supports
 * list - list loaded services
 * load   - activate a service that is inactive
 * stop   - stop/pause a service (does not unload)
 * start   - start/resume a service
 * refresh   - cause service to refresh its config
 * unload   - cause service to be unloaded and removed
 * register   - automatically load the service on next restart
 * unregister   - do not automatically load the service on next restart

Where

 *   - the name of the service in the registry (for example, HTTPD)
 *   - particular instantiation (for example, HTP0:)

Flags

 * -f 
 * -s silent
 * -d output to debugger

The following is an example of the output for the list command:

Instance       Handle          Path            Status HTP0:          0x000300e0      HTTPD.DLL       Running OBX0:          0x000304a0      OBEXSrVr.dll    Off MMQ1:          0x000325d0      MSMQD.Dll       Off

NOTE: The service name is the name that you use to register the service with Services.exe. You can register with Services.exe either in the registry (HKLM\Services\[service name]), or by means of the RegisterService function. Unlike some other operating systems, you cannot use this function to start a typical application as a service.

For more information about services, see the Platform Builder 4.0 documentation, which includes information about the services registry settings and how to programmatically create and work with services.

Keywords: kbinfo KB320907

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.