You can use SrvMan's Command Line interface to perform the following tasks:
Create services
Deleting services
Start/stop/restart services
Install & start a legacy driver with a single call
Note that when you run SrvMan with command-line arguments from non-console application (for example, from a Run dialog box), it displays the "Press any key to continue..." message and pauses just before exiting. This does not happen, when SrvMan is run from a console application (such as cmd.exe). To override this behavior, use the /pause:no switch.
Use the following command line to create services using SrvMan (parameters in brackets are optional):
Service name is an internal name used by Windows to reference the service. Display name is the name displayed in Windows Services snap-in. By default, both names are generated from the .exe or .sys file name, however, you can override it by specifying names explicitly.
Service type can be one of the following:
Start mode is one of the following:
Win32 services are created as interactive by default. To create a non-interactive service, you should specify the /interactive:no parameter. Normally, if a specified service already exists, SrvMan reports an error and stops. However, if you specify the /overwrite:yes parameter, an existing service will be overwritten instead.
Deleting services using SrvMan command line is quite obvious:
Note that you need to specify the internal service name (same as used for net start command), not the display name.
You can control all types of services using SrvMan command line:
Normally, SrvMan waits for the service to start. However, if you specify the /nowait parameter, SrvMan will return control immediately after the start/stop request was issued. Note that if you need SrvMan to wait before starting/stopping the service (for example, to switch to real-time log viewer window), you can use the /delay:<delay in msec> parameter.
You can easily test your legacy driver by using the following command line:
This command creates (or overwrites) a service for a given legacy driver file and starts it. If you have specified the /copy:yes switch, the driver file will be copied to system32\drivers directory. If /overwrite:no is specified, DbgMan will return an error if the service (or the driver file in system32\drivers) already exists. If /after:<msec> is specified, the driver will be stopped msec milliseconds after successful start. You can use this switch to test driver load/unload cycle.