Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WSH and NT Services
Message
 
 
To
13/12/2000 10:52:45
Josh Fedke
National Financial Corporation
Milwaukee, Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00452847
Message ID:
00452912
Views:
18
>Does someone have a quick code snippet using windows scripting host to start a WinNT service? It doesn't have to be WSH if someone has a different programmatic way to start and stop service. I am currently using wshobj.run(...), but that pops up a DOS window while trying to start the service. There must be a more elegant way, not to mention a way to get some sort of service startup status message. Thanks in advance.
>
> -Josh

Josh,
Using ADSI, you can:
oservice = GetObject("WinNT://MyMachine/LanManServer,service")
oservice.Start
HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

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

Click here to load this message in the networking platform