We help IT Professionals succeed at work.

Check Service Status on Remote PC via VFP

Last Modified: 2014-05-07
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, loService
loWbemServices = 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

Open in new window

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!
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.