Crate windows_service_detector

Source
Expand description

Windows Service execution environment detection.

Provides a single function, is_running_as_windows_service, that indicates whether the current process is running as a Windows Service or not. This is useful for building binaries that are run both from the command line for development and debugging and under the Windows Service manager.

The detection is based on the same approach used in .NET and Golang:

Functionsยง

is_running_as_windows_service
Return whether the current process is running as a Windows Service