Windows services can also be configured to start when certain trigger events occur. There are a number of predefined trigger types and the system also provides for the use of custom user supplied triggers. For more information refer to the following
Service Trigger Events
https://learn.microsoft.com/en-us/windows/win32/services/service-trigger-events
Service Trigger Structure
https://learn.microsoft.com/en-us/windows/win32/api/winsvc/ns-winsvc-service_trigger