Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HowTo list Services available on the computer
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00815556
Message ID:
00815612
Views:
23
Larri, thanks. Looks like what I need.

>
>Yuri,
>You could use ADSI to do this:
>local locomputer, loservice
>
>locomputer = getobject("WinNT://MyDomain/MyComputer,computer")
>for each loservice in locomputer
>   if upper(loservice.Class) = 'SERVICE' then
>      do case
>         case loservice.Status = 1
>            * service stopped
>            loservice.Start
>         case loservice.Status = 4
>            * service started
>            loservice.Stop
>      endcase
>   endif
>endfor
>For more information, check out the IADsService interface in MSDN.
>
>HTH.
Previous
Reply
Map
View

Click here to load this message in the networking platform