Administrator’s Guide
295
Using MCScript to Update Your Script Files
Service control commands
NOTE:
[..] Indicates optional parameters and switches.
Command name
Min #
params
Usage, examples, and comments
STARTSERVICE
1
STARTSERVICE
<SERVICE_NAME>
[<TIMEOUT_SECS>] /DEPENDENT
/DEPENDENT: Starts dependent services.
<TIMEOUT_SECS>: Time to wait for service to
start.
STOPSERVICE
1
STOPSERVICE
<SERVICE_NAME>
[<TIMEOUT_SECS>] /DEPENDENT
/DEPENDENT: Stops dependent services.
<TIMEOUT_SECS>: Time to wait for service to
start.
CREATESERVICE 5
CREATESERVICE
<NAME> <DISPLAY_NAME>
<TYPE> <START_TYPE> <EXE_NAME>
[<ACCOUNT_NAME>]
[<ACCOUNT_PASSWORD>]
<TYPE>: ’WIN32_OWN’ | ‘WIN32_OWN_I’ |
‘WIN32_SHARE’ | ‘WIN32_SHARE_I’ |
‘KERNEL_DRIVER’ | ‘FILE_SYS_DRIVER’
<START_TYPE>: ‘BOOT’ | ‘SYSTEM’ | ‘AUTO’ |
‘DEMAND’ | ‘DISABLED’
Example:
CREATESERVICE !ServiceName!
!DisplayName! WIN32_OWN_I AUTO
"!INSTALLDIR!\AFILE.EXE"
IF CREATESERVICE != FALSE
STARTSERVICE !ServiceName!
DELETESERVICE
1
DELETESERVICE
<SERVICE_NAME>
SERVICEEXISTS
1
SERVICEEXISTS
<SERVICE_NAME>