How do I know status of a service in a remote machine ?
-
Hello, How can I get the status of a service (Running, Stopped, etc) in a remote machine. I've the domain (of the remote machine) username and password. I need to get the status programmatically without using any tool. FYI : I'm using VC 6.0 Thanks in advance
-
Hello, How can I get the status of a service (Running, Stopped, etc) in a remote machine. I've the domain (of the remote machine) username and password. I need to get the status programmatically without using any tool. FYI : I'm using VC 6.0 Thanks in advance
You can give the remote machine name in the first parameter of
OpenSCManager
function. Then use theQueryServiceStatusEx
function to get the status of the service. To impersonate another user you can useLogonUser
andImpersonateLoggedOnUser
APIs.«_Superman_» I love work. It gives me something to do between weekends.
-
You can give the remote machine name in the first parameter of
OpenSCManager
function. Then use theQueryServiceStatusEx
function to get the status of the service. To impersonate another user you can useLogonUser
andImpersonateLoggedOnUser
APIs.«_Superman_» I love work. It gives me something to do between weekends.