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: https://msdn.microsoft.com/en-us/library/aa394602(v=vs.85).aspx

And this link: https://forum.xojo.com/18981-cpu-temperature/p1#p159341 should give you an idea how to convert the above link to Xojo.