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>
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$
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com