servRequest.exe <serviceName> <code> <perm>(optional)
- ServiceName: Name of the service, wchar_t
- code: control code to send
- perm: Permission schema, for multiple permissions use or operator
ServReqHandle.exe AppInfo 4 "GENERIC_ALL"
(elevation required)ServReqHandle.exe AppInfo 128
If not specified, will be set to SERVICE_USER_DEFINED_CONTROL
If specified, use the or operator.
Example: "GENERIC_READ|GENERIC_WRITE"
Complete list of permissions can be found from microsoft docs
For all services, codes 0-127 is reserved by microsoft, and codes 128-255 are service-defined, so they can define their own action.
Full documentation can be found from the microsoft docs.
Notifies a paused service that it should resume. The hService handle must have the SERVICE_PAUSE_CONTINUE access right.
Notifies a service that it should report its current status information to the service control manager. The hService handle must have the SERVICE_INTERROGATE access right. Note that this control is not generally useful as the SCM is aware of the current state of the service.
Notifies a network service that there is a new component for binding. The hService handle must have the SERVICE_PAUSE_CONTINUE access right. However, this control code has been deprecated; use Plug and Play functionality instead.
Notifies a network service that one of its bindings has been disabled. The hService handle must have the SERVICE_PAUSE_CONTINUE access right. However, this control code has been deprecated; use Plug and Play functionality instead.
Notifies a network service that a disabled binding has been enabled. The hService handle must have the SERVICE_PAUSE_CONTINUE access right. However, this control code has been deprecated; use Plug and Play functionality instead.
Notifies a network service that a component for binding has been removed. The hService handle must have the SERVICE_PAUSE_CONTINUE access right. However, this control code has been deprecated; use Plug and Play functionality instead.
Notifies a service that its startup parameters have changed. The hService handle must have the SERVICE_PAUSE_CONTINUE access right.
Notifies a service that it should pause. The hService handle must have the SERVICE_PAUSE_CONTINUE access right.
Notifies a service that it should stop. The hService handle must have the SERVICE_STOP access right. After sending the stop request to a service, you should not send other controls to the service.