System start and wakeup is the same for the service.
You can easy build a one constant value with a notification. When the service starts, the notification is fired.
Shutdown and Sleep is not possible. On this events, the service shut down.
If the system signals you that the service should shut down, don't you have enough time to at least trigger a profile change? Usually a service gets enough time to do its controlled shutdown procedure.
SERVICE_ACCEPT_PRESHUTDOWN und SERVICE_CONTROL_PRESHUTDOWN sollte da doch helfen.
https://docs.microsoft.com/en-us/windows…andler-function