This topic describes the various options of the SC command with the Create command option.
The SC command communicates with the Windows Service Controller and installed services. When used with its create command option, you can use it to create a Windows service under which the MDEX Engine will run.
sc [remoteServername] create Servicename binpath= "path\to\dgraph.exe dgraphFlags path\to\mdex_db" [Optionname= Optionvalue...]
A space must be used between the binpath parameter and its argument. You should also use double quotes around the argument.
Option Name/Values | Meaning |
---|---|
type= <serviceType> | The type of service to be created. Use the own parameter value, which means the service runs in its own process. It does not share an executable file with other services. This is the default for the sc create command. Note that other service types are available, but you should use the own value. |
start= <startType> | The start type for the service:
|
error= <errorSeverity> | The severity of error if the service does
not start during boot:
|
group= <loadOrderGroup> | Name of group of which this service is a member. The list of groups are stored in the registry under the ServiceGroupOrder key. Default is null. |
tag= yes|no | Do not use this parameter as tags are used only for device driver service types. |
depend= <dependencies> | Names of services or groups that must start before this service. Each name is separated by / (forward slash). |
obj= <accountName> | Name of the account under in the service will run. The specified account must exist and must be a valid account. Default is LocalSystem. |
password= <password> | Password of the obj account. A password is required if an account other than the LocalSystem account is used. |
displayname= <displayName> | A friendly, meaningful name that can be used in user-interface programs to identify the service to users. For example, if the service name is MService, you can specify Endeca MDEX Engine as the display name so that will be more meaningful when shown in the Windows Services Control Manager. |
sc create MDEXService displayname= "Endeca MDEX Engine" type= own error= severe obj= "CORPDEV\EndecaUser" password= banx912 binpath= "c:\endeca\latitude\2.1.0\mdex\bin\dgraph.exe --port 5555 --threads 4 --pidfile c:\mdex_db\dgraph.pid --log c:\mdex_db\dgraph.log --out c:\mdex_db\dgraph.out c:\mdex_db\mdexdb"
For ease of use, you can place the command in a batch script.