Stops or controls a service.
wntSvcControl(server, service-name, flags, control-code)
(s) server-name: the UNC name of the server on which the function will execute (e.g., "\\MYSERVER"), or ("") for the local computer.
(s) service-name: the name of the service to be looked for.
(i) flags: specifies the type of name that "service-name" represents:
0 display name (the name shown in Control Panel)
1000 service name (the actual registry key name)
(i) control code: specifies the operation to be performed. See below.
(i) returns 1.
Control codes:
Value |
Name |
Meaning |
1 |
SERVICE_CONTROL_STOP |
Requests the service to stop. |
2 |
SERVICE_CONTROL_PAUSE |
Requests the service to pause. |
3 |
SERVICE_CONTROL_CONTINUE |
Requests the paused service to |
4 |
SERVICE_CONTROL_INTERROGATE |
Requests the service to update |
Or it can be a user-defined control code in the range of 128 to 255, inclusive.
; Load Appropriate Extender AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')
wntSvcControl("", "Spooler", 0, 1) ; stop the Spooler service Exit