这是使用WMI的正确方法吗?

时间:2015-04-20 09:31:39

标签: c# .net wmi

我正在尝试在服务器上构建一个工具,它将在客户端上打开浏览器。 请注意,服务器和客户端位于我们公司的同一个域中

一切正常,但是当我尝试在客户机上打开浏览器时

 string theProcessToRun = popupURL + "?CallerID=" + callerID;

                string remoteIdentifier = string.Format(@"\\{0}\root\cimv2:Win32_Process", ipAddress);
                ManagementClass mc = new ManagementClass(remoteIdentifier);

                mc.InvokeMethod("Create", new[] { theProcessToRun });

如您所见,我正在使用@"\\{0}\root\cimv2:Win32_Process", ipAddress,**我不知道这是否正确,因为我使用的是Windows客户端,所以我不知道是什么这个root必须在这里做

我有这个例外

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) 

在这一行

mc.InvokeMethod("Create", new[] { theProcessToRun });
你可以帮忙吗

0 个答案:

没有答案