使用IP地址检索远程计算机的操作系统详细信息 [英] Retrieve Operating system details of a remote computer using IP address

查看:123
本文介绍了使用IP地址检索远程计算机的操作系统详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我有一个要求,我试图使用远程计算机系统的IP地址(系统通过LAN连接的系统)来检索操作系统信息.我能够提取信息,但是只能从Windows 7操作系统中提取信息.尝试XP,这给了我一个例外,
访问被拒绝.(来自HRESULT的异常:0x80070005(E_ACCESSDENIED))"
我无法找到原因.....请向我提出建议,我该如何解决该问题.

问候
Prafulla

解决方案



请首先检查其中的EnablePriviliges属性设置为true并将ImpersonationLevel设置为Impersonate.

像这样:

 ManagementScope范围=  ManagementScope(" ,选项);
scope.Options.EnablePriviliges =  true ;
scope.Options.Impersonation = System.Management.ImpersonationLevel.Impersonate; 



如果您仍然遇到异常,由于拥有适当的特权,我们将做更多的研究,请尝试以下操作:

有关您的异常的常规信息(从MS Technet复制):
当连接的用户未被远程服务器识别或以某种方式受到限制(例如,该用户可能被锁定)时,会发生此错误.当帐户位于不同的域时,这种情况最常发生. WMI安全性的最新更改也可能导致发生此错误:

Windows XP和Windows Server 2003不允许使用以前允许的空白密码.

WMI不允许异步回调到Windows 98客户端.从Windows 98计算机到Windows XP计算机的诸如SWbemServices.ExecNotificationQueryAsync之类的调用将导致访问被拒绝"错误返回给Windows 98计算机.

DCOM配置访问设置可能已更改.

如果目标计算机运行的是Windows XP,则可以将注册表项HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Lsa下的Forceguest值设置为强制关闭来宾帐户(值为零).


解决方案:
http://msdn.microsoft.com/en-us/library/aa393266%28v = vs.85%29.aspx [ ^ ]

http://www.computerperformance.co.uk/Logon/code/code_80070005.htm [ ^ ]

应该可以.
问候


hi I have a requirement that I am trying to retrieve operating system information using IP address(system''s are connected through LAN)of a remote computer system.I am able to extract the information but, only from windows 7 operating system when I am trying for XP it is giving me an exception that ,
"Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"
I am unable to find why it is..... please advice me,how would i rectify the problem.

Regards
Prafulla

解决方案

Hi,

please check first if EnablePriviliges Property in is set to true and ImpersonationLevel is set to Impersonate.

Like this:

ManagementScope scope = new ManagementScope("\\\\192.168.178.55\\root\\cimv2", options);
scope.Options.EnablePriviliges = true;
scope.Options.Impersonation = System.Management.ImpersonationLevel.Impersonate;



If you still get the exception we hat do do more research because of right privileges, try this:

General Information about your exception (copied from MS Technet):
This error occurs when the connected user is not recognized or is restricted in some fashion by the remote server (for example, the user might be locked out). This happens most often when accounts are in different domains. Recent changes to WMI security can also cause this error to occur:

Blank passwords, formerly permitted, are not allowed in Windows XP and Windows Server 2003.

WMI does not allow asynchronous callbacks to a Windows 98 client. A call like SWbemServices.ExecNotificationQueryAsync from a Windows 98 computer to a Windows XP computer will result in an Access Denied error returned to the Windows 98 machine.

The DCOM configuration access setting might have been changed.

If the target computer is running Windows XP, the Forceguest value under the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa might be set to force the Guest account off (value is zero).


Solutions:
http://msdn.microsoft.com/en-us/library/aa393266%28v=vs.85%29.aspx[^]

http://www.computerperformance.co.uk/Logon/code/code_80070005.htm[^]

Should work.
Regards


这篇关于使用IP地址检索远程计算机的操作系统详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆