收集网络计算机详细信息

时间:2011-03-23 09:25:17

标签: c# remote-access

我编写了一个程序,用于从网络中的远程计算机收集详细信息

private RemoteSysInformation.SystemInformation sysinfo;

if (sysinfo.Get(ipaddress, username, password) != RemoteSysInformation.SystemInformation.Status.Success)
{
    MessageBox.Show(sysinfo.Get(ipaddress, username, password).ToString());
}        
else
{
    List.Items.Add(new ListViewItem(new string[] { "BIOS Version", sysinfo.Bios }));
    List.Items.Add(new ListViewItem(new string[] { "OS Name", sysinfo.OSName }));
    List.Items.Add(new ListViewItem(new string[] { "Version", sysinfo.OSVersion.description }));
    List.Items.Add(new ListViewItem(new string[] { "OS Manufacturer", sysinfo.OSManufacturer }));
    List.Items.Add(new ListViewItem(new string[] { "System Name", sysinfo.ComputerName }));
    List.Items.Add(new ListViewItem(new string[] { "Time Zone", sysinfo.Timezone.standardname }));
    List.Items.Add(new ListViewItem(new string[] { "Windows Directory", sysinfo.WindowsDirectory }));
    List.Items.Add(new ListViewItem(new string[] { "Total Physical Memory", SizePrettyPrint(sysinfo.TotalPhysicalMemory) }));
    List.Items.Add(new ListViewItem(new string[] { "Available Physical Memory", SizePrettyPrint(sysinfo.FreePhysicalMemory) }));
    List.Items.Add(new ListViewItem(new string[] { "Total Virtual Memory", SizePrettyPrint(sysinfo.TotalVirtualMemory) }));
    List.Items.Add(new ListViewItem(new string[] { "Available Virtual Memory", SizePrettyPrint(sysinfo.FreeVirtualMemory) }));
    List.Items.Add(new ListViewItem(new string[] { "Page File Space", SizePrettyPrint(sysinfo.PageFileSize) }));
    List.Items.Add(new ListViewItem(new string[] { "System Manufacturer", sysinfo.SystemManufacturer }));
    List.Items.Add(new ListViewItem(new string[] { "System Model", sysinfo.SystemModel }));
    List.Items.Add(new ListViewItem(new string[] { "System Type", sysinfo.SystemType }));
    List.Items.Add(new ListViewItem(new string[] { "Domain", sysinfo.Domain }));
}

但它不断提供错误 RPC服务不可用  请帮助!!!!!!!!!!!!!!!

错误为The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

2 个答案:

答案 0 :(得分:0)

确保服务 Winmgmt (Windows Management Instrumentation)正在远程计算机上运行。

答案 1 :(得分:0)

错误消息“RPC 服务器不可用”或“RPC 服务不可用”?

  • 远程机器是否已启动?
  • 远程计算机是否在同一个LAN上?
  • 远程机器是否允许远程连接?
  • 您指定的用户是否在远程计算机上拥有正确的权限?
  • 本地和/或远程计算机上是否有防火墙?
  • 本地和远程计算机之间是否存在防火墙(可能是丢弃的RPC数据包)?
  • 您的DNS设置是否正确?
  • 什么是选项。设置?例如, options.EnablePrivileges