Fixes #5945: add windows support to services

Same questoin here: can't we detect if a service is running on Windows?