How to check if Standalone Webservice is running?

How can I check by code if a standalone Webservice .exe (damenozied with SC) is running?
I have a script for startin/ stopping (using shell “net start/stop”) but windows does not have anything to check the state of a service or I am missing something?

Ah ducduckgo is my friend, found a shell command “sc query servicename” that would match… but is there another, more elegant solution?

Use WMI. From this link you will find the way to find your service:

And this link: should give you an idea how to convert the above link to Xojo.