AnnaBZ
asked on
Getting status of a service with VB or Win API
Hi Guys,
I need to start and stop a service from VB code ,but first of all I need to get its status and depending on the result start or stop it . I do the start or stop with Shell command
SrvName="ServiceName"
Shell "cmd.exe /c net stop " & SrvName
or
Shell "cmd.exe /c net start " & SrvName
any help or better the code will be really appreciated
I need to start and stop a service from VB code ,but first of all I need to get its status and depending on the result start or stop it . I do the start or stop with Shell command
SrvName="ServiceName"
Shell "cmd.exe /c net stop " & SrvName
or
Shell "cmd.exe /c net start " & SrvName
any help or better the code will be really appreciated
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER