The ADDSERVICE command adds new service with parameters you pass to it.
Syntax:
ADDSERVICE /SN=name /PM=name [/DISP=name] [/DES=string] [/WD=dir] [/PRM=string] [/CONx]
[/ACT=user] [/PW=passw] [/IDx] [/SWx] [/LG=string]
[/STTx] [/UPx] [/UT=msec]
[/FPx] [/FR=msec][/GSx] [/SDT=msec]
[/IN=string] [/OUT=string]( [/PRYx] [/CPUx]
[/CF=number] [/RR=string] [/RM=string] [/ACN="x1|x2"]
[/DPS=service] [/ENV=string] [/PRE=string|string|string|msec]
[/POST=string|string|string|msec]
[/RPR=string|string|string|msec] [/RPO=string|string|string|msec]
[/EPR=string|string|string|msec] [/EPO=string|string|string|msec]
[/DBS=string|string|string|string|msec|comm] [/DPO=string|string|string|string|msec|comm]
[/DE=string|string|string|string|msec|comm] [/SCD=time|time|date|date|rules] [/SRVx]!
Note: x is a character or the integer value. Parameters in square brackets are optional.
Full description of all the parameters is given in this section.
Return values:
If the ADDSERVICE command succeeds the return value is OK!, otherwise the return value is ERR!