如何查看邻居计算机的目录信息 [英] How to view the directory information of the neighbor computer
本文介绍了如何查看邻居计算机的目录信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家
我有一个关于在本地网络中查看远程
计算机的目录信息的问题。我使用了C#类:OpenFileDialog,它可以
不能浏览其他计算机的目录信息。如果我有一个
管理员帐户,我如何查看其他计算机的整个
目录信息。谁能帮助我?提前谢谢。
最好的问候
Zeeway
everyone
I have a question about viewing the directory information of the remote
computer in the local network. I used the C# class: OpenFileDialog which can
not browse other computer''s directory information. How can I view the whole
directory information of other computer given that I have one of its
administrator account. Could anyone help me? Thank you in advance.
Best Regard
Zeeway
推荐答案
你好,zeeway!
你可以使用WMI(Win32_Directory)。
或
如果你有管理员帐户你可以查看计算机磁盘的内容,你可以访问例如磁盘C的b $ b,你将使用填充UNC路径\\computername \C
Hello, zeeway!
You can use WMI ( Win32_Directory ).
or
if you have admin account you can view contents of computers disk,
you access for instance disk C, you will use fillowing UNC path \\computername\C
-
问候,Vadym Stetsyak
www: http://vadmyst.blogspot.com
谢谢。我尝试过代码:
ConnectionOptions Conn = new ConnectionOptions();
Conn.Username =" test";
Conn.Password =" 123";
ManagementPath p = new ManagementPath(" \\\\\192.168.1.9 \\\\\\\\\\\\\\;
ManagementScope ms = new ManagementScope(p,Conn);
ObjectQuery oq = new ObjectQuery(" SELECT * FROM Win32_LogicalDisk");
ManagementObjectSearcher link = new ManagementObjectSearcher(ms,oq);
ManagementObjectCollection queryCollection = link.Get();
foreach(CollectionObject中的ManagementObject dsk)
{
Console.Write(dsk [" Caption"]);
}
它可以帮助我获得基本的远程计算机上的磁盘信息,但
某个磁盘上的目录和文件信息仍然无法获得
abtained。
你能给吗?我的手了吗?
Best R egard
Zeeway
" Vadym Stetsyak" < va ***** @ ukr.net>
Thank you. I have tried the code:
ConnectionOptions Conn = new ConnectionOptions();
Conn.Username ="test";
Conn.Password ="123";
ManagementPath p = new ManagementPath("\\\\192.168.1.9\\root\\cimv2");
ManagementScope ms = new ManagementScope(p,Conn);
ObjectQuery oq = new ObjectQuery("SELECT * FROM Win32_LogicalDisk");
ManagementObjectSearcher link = new ManagementObjectSearcher(ms,oq);
ManagementObjectCollection queryCollection = link.Get();
foreach (ManagementObject dsk in Collection)
{
Console.Write(dsk["Caption"]);
}
It can help me accquire basic disk information on the remote computer, but
the directory and file information on a certain disk still can not be
abtained.
Can you give me a hand any more?
Best Regard
Zeeway
"Vadym Stetsyak" <va*****@ukr.net>
你好,zeeway!
你可以使用WMI(Win32_Directory)。
或
如果您有管理员帐户,您可以查看计算机磁盘的内容,您可以访问例如磁盘C,您将使用填充UNC路径
\\computername \ C
Hello, zeeway!
You can use WMI ( Win32_Directory ).
or
if you have admin account you can view contents of computers disk,
you access for instance disk C, you will use fillowing UNC path \\computername\C
这篇关于如何查看邻居计算机的目录信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文