The restartsvc.exe utility restarts a Windows service through an action invocation. This utility is mainly used as an action for a Process Monitor table entry. Before running this utility, make sure that the corresponding process monitoring entry is already created. This utility is available on Windows only.
This utility has the following format:
restartsvc <arglist>
Consists of the following 11 arguments. You must provide all of the following arguments for successful execution:
Specifies the Windows service to restart.
Specifies the empire trap type.
Specifies the process monitoring entry index.
Specifies the process monitoring entry description.
Specifies the process monitoring entry attribute.
Specifies the process monitoring entry operator.
Specifies the process monitoring entry current value.
Specifies the process monitoring entry threshold value.
Specifies the process monitoring entry flags.
Specifies the process monitoring entry regular expression.
Specifies the process monitoring entry service index from the NT Service table.
Examples
The following example invokes restartsvc.exe in a sysedge.cf entry:
watch process procAlive 'testsvc|TESTSVC' 2000 0x8 30 'testsvc restart' '%CASYSEDGE%\bin\restartsvc.exe c:\testsvc.exe'
You can also invoke restartsvc.exe on the command line. The following example restarts process ID 125:
"%CASYSEDGE%\bin\restartsvc.exe" c:\testsvc.exe 10 2000 "testsvc restart" 1 3 6 4 0x8 "testsvc|TESTSVC" 125
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |