星期四, 九月 14, 2006

(VB.NET)获取远程机器的目录以及文件信息

Imports System

Imports System.Management

Module Module1

Public Sub Main()

Dim disk As ManagementObject = New ManagementObject( "win32_logicaldisk.deviceid=""c:""")

disk.Get()

Console.WriteLine("硬盘容量大小(bytes): " & disk("Size"))

End Sub

End Module

没有评论: