Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automate starting & stopping of NT service in VFP code
Message
 
 
To
01/11/2000 12:43:26
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00436756
Message ID:
00440657
Views:
24
>I need to start and stop an NT service based on events in a VFP app. Does anyone have any ideas on how to do this?

You can use ADSI for this. You can get a COM reference to the service and start and stop it at will.

oservice = getobject("WinNT://MyComputer/Myservice,service")
oservice.Start
oservice.Stop

Check out MSDN for more information. http://msdn.microsoft.com/library/psdk/adsi/adsistartpage_7wrp.htm
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform