If the service isn't running you can try to start service with
isAllOk = oShellApp.ServiceStart("Here write the Service Name",.t.)
and to stop with
isAllOk = oShellApp.ServiceStop("Here write the Service Name",.t.)
for more info check
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/objects/ishelldispatch2/servicestart.asp>Perfect, Thanks Vladimir.
>
>>Take a look at Message #
1180154>>
>>>Hello,
>>>
>>>We have a windows service provided by another company and running on a given XP machine, but it stops sometimes and we want to check its status from a VFP application.
>>>
>>>Is it possible to know the Windows Service's status (Stopped or Active) with VFP Code? I guess we need to call an API function.
>>>
>>>Thanks
>>>
>>>Juan Carlos.
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst