Click to See Complete Forum and Search --> : Stopping Services


Ashley Winters
November 15th, 1999, 01:45 PM
Hi,

I am trying to stop some of the Windows NT Services running on the local server from my VB application using the following command.

lRetVal = WinExec("NET STOP MyService", 0)

But "MyService" is a Windows NT service which has "MyOtherService" as a dependant service. Since "MyOtherService" is still running, I am not able to stop "MyService". Well I could resolve this by first stopping "MyOtherService" and then stopping "MyService". But, I do not know at this point which are the other services that are dependent on "MyService". Hence the request for expert opinion.

Thanks,
Ashley

vhgupta
March 30th, 2001, 02:51 AM
Hi,
actually i wants to start/stop a service using VB application so can u plz tell me how to do that.
Expecting detailed soln as i m beginner
rgds

:-)