@SERVICE |
@SERVICE[service,info] : Returns information about the specified service.
service - The service name to query. If the service doesn't exist, @SERVICE will return -1.
info - The information you want:
1 | The type of service. This will return one or more of the following values: |
1 | Device driver |
2 | File system driver |
16 | The service runs in its own process |
32 | The service shares a process with other services |
256 | The service can interact with the desktop |
2 | The current state of the service. This will return one of the following values: |
1 | The service is not running |
2 | The service is starting |
3 | The service is stopping |
4 | The service is running |
5 | The service continue is pending |
6 | The service pause is pending |
7 | The service is paused |
3 | Returns the check-point value the service increments to report its progress during a lengthy start, stop, pause, or continue operation. This value will be 0 if there is no pending operation. |
4 | The control codes the service accepts and processes in its handler function. This will return a combination of the following values (you can check the return value with the @EVAL OR test): |
1 | The service can be stopped |
2 | The service can be paused and continued |
4 | The service is notified when system shutdown occurs |
8 | The service can reread its startup parameters without being stopped and restarted |
16 | The service is a network component that can accept changes in its binding without being stopped and restarted |
32 | The service is notified when the computer's hardware profile has changed |
64 | The service is notified when the computer's power status has changed |
128 | The service is notified when the computer's session status has changed |
256 | The service can perform pre-shutdown tasks |
5 | Returns the estimated time required for a pending start, stop, pause, or continue operation (in milliseconds). |
Examples:
echo %@service[audiosrv,1]
16
echo %@service[audiosrv,2]
4
echo %@service[audiosrv,3]
0
echo %@service[audiosrv,4]
193