1

我希望在远程机器上运行 Debugview(我有该机器的用户名、密码和 IP 地址)。我已经开发了这段代码

object[] theProcessToRun = { "C:\\Dbgview.exe /t /l C:\\debugview1.log" };
            ConnectionOptions theConnection = new ConnectionOptions();
            theConnection.Username = "Username";
            theConnection.Password = "Password";

            ManagementScope theScope = new ManagementScope("\\\\ipaddress\\root\\cimv2", theConnection);
            ManagementClass theClass = new ManagementClass(theScope, new ManagementPath("Win32_Process"), new ObjectGetOptions());
             theClass.InvokeMethod("Create", theProcessToRun);

此代码在后台启动远程计算机上的调试视图(可以通过选择所有用户运行的进程选项在任务管理器中查看),但问题是,它没有连接本地主机。

所以任何人都可以建议我进行更改或任何其他方式来实现我正在做的事情。

编辑:得到答案

您需要具有管理权限才能登录远程计算机,以便调试视图自动连接(连接到本地主机)

4

0 回答 0