I have found code for VFP which lets me determine if a service is running and stop it or find out all it's information.
However, I am running a desktop application and have services failing on the Server where the SQL Data is stored.
How can I determine via VFP (if possible) if a service is running on a different PC given the IP address or Machine Name - or something.
Local loWbemServices, loServicesCollection, loServiceloWbemServices = GetObject("winmgmts:\\.")loServicesCollection = loWbemServices.InstancesOf("Win32_Service")For Each loService In loServicesCollection ? '----' loProperties = loService.Properties_ For Each loProperty IN loProperties lcProperty = loProperty.Name ? lcProperty,':', loService.&lcProperty EndforEndfor
This is awesome for my PC, but I need to know if the main services are running on the server.
I am even willing to put a job in SQL and store status in a table and have desktop pull from the table... I just need to know if those services are up or down!