Service Control Manager
Introduction
Service Control Manager is a program that gives you full control over services installed on your computer, and on remote computers as well.Using this tool you can
- Install and uninstall services.
- Start, stop and pause services.
- View list of all installed services and their properties.
- Change service properties.
- Do all of the above on REMOTE computer!
A word about drivers
Here and below "services" means both drivers and services. Although this may be a bit confusing in the beginning, such abbreviation helps to avoid infinitely repeating phrase "drivers and services".
Screenshot
Download
- Service Control Manager (43K ZIP)
- Source Code (90K ZIP, Visual C++ 4.1)
Installation
No installation required. Just unzip and runServiceControlManager.exe
Starting Service Control Manager
To start Service Control Manager, simply double-click on Service Control Manager executable file (ServiceControl.exe). When started, Service Control Manager displays list of services installed on local computer and their properties. Since there are so many properties, not all of them are displayed by default. You may change the set of displayed properties usingView->Columns
menu.
The list of services is sortable - click on column header to sort the list by that column. Click again to reverse sort order. When you start the program, services are sorted by the first column (usually this is "internal name").
Starting and Stopping Services
Using toolbar buttons and/or items fromServices
menu,
you can attempt to start, stop, pause or resume any service.
Of course, trying to start a service that is already running, or to stop
the service that is not running, usually causes an error.
Also, most services don't support pausing and resuming.
If operation fails, Service Control Manager displays an error message
that describes the reason of the failure:
Properties of Services
Service Control Manager can display the following properties of services:- Account
- Depends On
- Driver Object
- Error Control
- Interactive
- Internal Name
- Load Group
- Name
- Tag ID
- Type
- TypeEx
- Startup
- State
- Path
Account
For services (but not drivers) this field contains a name of user account
of the service. This may be either real user account or LocalSystem
account. LocalSystem
account has administrator rights on local
computer but it is not recognized by remote computers, and thus cannot make
network connections. Most services operate in LocalSystem
account.
Depends On
This field contains a list of services and/or service groups that given service
depends on. If service A depends on service B, service A can work only if
service B is running. When user requests to start service A, operating system
checks the state of service B. If service B is running, operating system attempts
to start service A. If service B is not running, operating system attempts to
start service B first. If service B cannot be started, the whole operation fails
(without attempt to actually start service A). If service B has been started
successfully, operating system attempts to start service A.
If service A depends on group G of services, at least one of members of G must be running before A can work. Group names are prefixed with '+' sign in dependencies list.
Driver Object
This field contains a name of the driver object used by operating system when
it loads given device driver. This field has no meaning for services. Usually,
this field is empty, that means that operating system will use a default
object name created by the I/O system.
Error Control
This field specifies the severity of the error if this service fails to start
during Windows NT startup, and determines the action taken by the startup program
if failure occurs. This field can have on of the following values:
- Ignore - log the error in event log and continue Windows NT startup.
- Normal - log the error in event log, display warning message "At least one service failed..." and continue Windows NT startup.
- Severe - log the error in event log. If the last-known-good configuration is being started, the startup operation continues. Otherwise, the system is restarted with the last-known-good configuration.
- Critical - the startup program logs the error, if possible. If the last-known-good configuration is being started, the startup operation fails. Otherwise, the system is restarted with the last-known good configuration.
Interactive
This field defines whether service can interact with GUI desktop or not. Only
services are able to interact with the desktop - drivers don't have this capability.
Internal name
is a name used by Windows NT programs to refer to the services.
The program must know internal name of the services in order to perform actions
on the service. The maximum length of internal name is 256 characters.
The service control manager database preserves the case of the characters,
but service name comparisons are always case insensitive. Internal name
cannot contain forward slash (/) and back slash (\) characters (but can
contain spaces). All services must have internal name.
Internal name cannot be empty.
Load Group
or group. This field specifies what group given service belongs to.
A service can belong to at most one group. This field is empty if the
service does not belong to any group. Groups are used to organize service
dependencies (see Depends On field) and to define
the order in which services are started during early phases of system boot.
Name
or display name is a name used in user-interface programs (e.g. in
control panel) to present the service to the user. Each service must have
display name. Display name cannot be empty.
Tag ID
This field defines an order in which given service will be loaded within
its group. Tag IDs are evaluated only for service with Boot and System
startup. This field is empty for most services.
Type
The type is either service or driver. Of course, each service
must have a type.
TypeEx
This field contains extended service type information. For drivers, this field
may contain a string "FS" that stands for "file system driver".
For services this field may contain a string "Shared" that means
that this service shares its EXE file with other services.
This field is empty in most cases.
Startup
property defines when the service is started.
Windows NT defines the following values for this field:
- Boot - the service is critical for system boot. The code of the service is loaded to computer memory by the OS loader in the earliest phase of system boot process. Only drivers can have Boot startup. Drivers that have Boot startup cannot be stopped.
- System - the service is loaded automatically during system boot process. Only drivers can have System startup.
- Auto - the service is loaded automatically by the system when boot process is finished. Both services and drivers can have Auto startup.
- Manual - the service can be started on demand. The demand may come from user, application program or other service that depends on this service. Both services and drivers can have Manual startup.
- Disabled - the service cannot be started. Both services and drivers can have Disabled startup.
See Windows NT Magazine article Inside the Boot Process Part I and Part II by Mark Russinovich for detailed description of Windows NT boot process.
State
is a current state of the service. Each service has state, and service state can
change from time to time. Windows NT defines the following states:
- Stopped - service is not running. In this case Service Control
Manager displays empty string in the
State
field. - Starting... - service is starting up.
- Running - service is running
- Stopping... - service is going to stop
- Pause pending... - service accepted pause request and is going to pause
- Paused - service is paused
- Continue pending... - service accepted continue request and is moving towards running state
Path
is a path to service's executable file. Some system services have empty path.
Adding New Service
To add a new service chooseService->Add
menu item or simply press INS button.
You will be prompted to enter the following properties of your service:
- Service Name - internal name of your service. This attribute is required.
- Display Name - service name for display in user programs. This attribute is required.
- Group - service's load group. This attribute may be left empty.
- Depends on - list of service's dependencies.
Use semicolon (;) to separate items in the list. Group names must be prefixed with '+' sign.
Example of dependency list:
+SCSI Miniport;ParPort;+Extended Base
. Dependency list may be left empty. - Path to the executable file - this attribute is required.
- Service type - this can be one of
- Service (own process)
- Service (shared process)
- Kernel-mode driver
- File System Driver
- Interactive - specifies whether your service can interact with the desktop. This attribute is required.
- Startup - service's startup. This attribute is required.
- Error control - service's error control
- Account or Driver Object -
specifies account for services or driver object name for drivers. This attribute is not required.
LocalSystem
account will be used for the service if this attribute is omitted. - Password - this field is used to specify account's password. You don't need to specify
a password for
LocalSystem
account.
This is a deliberate decision, not a bug. Service Control Manager does not try to be too clever and enforce Microsoft's limitations, except for trivial ones. If some day Microsoft will allow interactive drivers, Service Control Manager will not be affected by this change.
Configuring Existing Service
Press Enter or double-click on a service in the list to configure the service. You may also useService->Configure
menu item.
Service configuration dialog will display the same service properties as "add service" dialog. In fact, this is the same dialog, but decorated a bit differently. You can change everything except for service's internal name. This is because changing service's internal name in fact means deleting this service and creating new service with different name.
Removing Existing Service
Press DEL button or useService->Remove
menu item to permanently remove an existing
service from the system (after confirmation). If the service is running, the system will try to
stop it. If the service cannot be stopped, it will be marked for deletion and removed on next
system startup. If some processes have open handles to the service, the service will be removed
after all these handles are closed. If service is not running and there are no open handles to it,
the service will be removed (almost) immediately.
Connecting to Remote Computer
Use"File->Select Computer"
menu item to connect to remote
computer. You will be prompted for computer name.
Service Control Manager relies on Windows NT default mechanism for user name in password when making connection to remote computer. This mechanism works as follows: if you already have an open connection to the computer in question, Windows NT will use user name and password used for that connection. If you don't have any open connections to the computer, Windows NT will use user name and password under which you are logged in to the local computer.
Fooling Windows NT default logon mechanism
If you don't like this mechanism, you may try to fool it as described below.
Open command interpreter (cmd.exe
) and give it the following command:
net use \\
computer_name\ipc$ /user:
username
password
Of course, you must specify real computer name, user name and password. If you have a
Windows NT domain, user name may be in the form domain\user
. NOTE: the direction
of slashes (/ and \) is important!
If the command above has been executed successfully, it creates a connection to the remote computer with required user name and password. Windows NT will use specified user name and password for all subsequent connections to that computer.
Windows NT requires that all simultaneous connections to single remote computer
to have the same user name and password (a.k.a. "credentials"). Therefore, the
command above may fail if you already have a connection to the computer in question with
different user name and password. Use net use
command without parameters to
see the list of existing connections. Use net use connection /d
to remove unwanted connections and repeat the procedure.
Distribution and Legal Stuff
Service Control Manager is Copyright (c) 1999 Ivan Krivyakov.The program is shipped "as is" without warranties of any kind, either explicit or implied, including but not limited to warranties of merchantability, fitness for any particular purpose, et cetera, et cetera. Under no circumstances shall Ivan Krivyakov, his employers, his family members, his cat or any other creature associated with Ivan Krivyakov be liable for a damage, loss of profit or other unpleasant things that were caused by use or inability to use Service Control Manager.
Service Control Manager is distributed under the terms of the GNU General Public license.