开发者

Process.GetProcessById how to pass credentials

开发者 https://www.devze.com 2022-12-29 06:37 出处:网络
I need to find out is Process is running on remote machine or not, I know process id and remote pc ip. How to do that?

I need to find out is Process is running on remote machine or not, I know process id and remote pc ip. How to do that? I have tried cod开发者_如何学运维e below but do not find way to pass credentials to login to remote machine. Using code below I get access denied as expected.

Process engineProcess = Process.GetProcessById(PID, IP);

Regards, Tomas


One way you could try it by changing the Identity of current thread by impersonating. here is an example of how to implement such:

http://support.microsoft.com/kb/306158

look under the section "Impersonate a Specific User in Code"

0

精彩评论

暂无评论...
验证码 换一张
取 消