get service or process
-
Hello everyone, If I have enough priveleges, how could I get and access the services on a remote computer if I know the remote computer machine name? For example, I want to enumerate all the services on a remote computer and stop a service if its name matches some rules? thanks in advance, George
-
Hello everyone, If I have enough priveleges, how could I get and access the services on a remote computer if I know the remote computer machine name? For example, I want to enumerate all the services on a remote computer and stop a service if its name matches some rules? thanks in advance, George
Process.GetProcesses(machineName)[^] gives a list of processes running on the specified machine. For authenticating remote machine, I think you should impersonate the user as
Process.GetProcesses
is not allowing to supply any user credentials.All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
-
Process.GetProcesses(machineName)[^] gives a list of processes running on the specified machine. For authenticating remote machine, I think you should impersonate the user as
Process.GetProcesses
is not allowing to supply any user credentials.All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
What means "impersonate the user as Process.GetProcesses is not allowing to supply any user credentials."? I read a couple of times but do not know what you mean. Could you say in some other words please? :-) regards, George
-
What means "impersonate the user as Process.GetProcesses is not allowing to supply any user credentials."? I read a couple of times but do not know what you mean. Could you say in some other words please? :-) regards, George
Process.GetProcesses
is not allowing to supply user credentials for the remote machine. So you need to use some impersonation techniques to authenticate the remote machine. I haven't used but I think WindowsImpersonationContext[^] class can be used for this.All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
-
Hello everyone, If I have enough priveleges, how could I get and access the services on a remote computer if I know the remote computer machine name? For example, I want to enumerate all the services on a remote computer and stop a service if its name matches some rules? thanks in advance, George
WMI is capable of doing that.[^]
Don't happy, be worry.
-
WMI is capable of doing that.[^]
Don't happy, be worry.
Cool, Uros! regards, George
-
Hello everyone, If I have enough priveleges, how could I get and access the services on a remote computer if I know the remote computer machine name? For example, I want to enumerate all the services on a remote computer and stop a service if its name matches some rules? thanks in advance, George
Have a look at the ServiceController class, there's even an example to do what you're asking on MSDN: http://msdn.microsoft.com/en-us/library/system.serviceprocess.servicecontroller.aspx[^] Hope this helps Tom
-
Have a look at the ServiceController class, there's even an example to do what you're asking on MSDN: http://msdn.microsoft.com/en-us/library/system.serviceprocess.servicecontroller.aspx[^] Hope this helps Tom
Thanks Tom, The link your provided is very helpful. After reading it, I am confused about what means "This would be useful, because the Service Control Manager (SCM) Microsoft Management Console snap-in does not support custom commands." -- custom commands means? Could you show me an example please? regards, George
-
Process.GetProcesses
is not allowing to supply user credentials for the remote machine. So you need to use some impersonation techniques to authenticate the remote machine. I haven't used but I think WindowsImpersonationContext[^] class can be used for this.All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
Thanks N a v a n e e t h! I read the link but confused about what means "impersonation operation" or so-called impersonation technologies, does it a hacking technologies which someone acts (pretents) to be someone else? Could you clarify or provide some reference document about this technique please? regards, George