>Hi Gang!
>
>How do you go about turning a service OFF in VFP ( by using code ). And.... turn a Service back On ???
If you can use a CMD window, you can use the NET START/STOP etc. commands:
https://technet.microsoft.com/en-us/library/cc736564%28v=ws.10%29.aspxWithout having to shell out to a CMD window, the best bet might be WMI. I believe there are users here experienced with using WMI from VFP. Here's a Google result that uses VBScript, the calls are probably translatable to VFP:
http://www.computerperformance.co.uk/vbscript/wmi_services.htmAny method you end up using will require elevated privileges to run on current versions of Windows.
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up