Sub ShowDriveInfo(drvpath)
Dim fs, d, s, t
Set fs = CreateObject("Scripting.FileSystemObject")
Set d = fs.GetDrive(fs.GetDriveName(fs.GetAbsolutePathName(drvpath)))
'************************
' Select Case d.DriveType
' Case 0: t = "Unknown"
' Case 1: t = "Removable"
' Case 2: t = "Fixed"
' Case 3: t = "Network"
' Case 4: t = "CD-ROM"
' Case 5: t = "RAM Disk"
' End Select
' s = "Drive " & d.DriveLetter & ": - " & t
' s = s & vbCrLf & "SN: " & d.SerialNumber
'************************
s = d.SerialNumber
'这个s的值针对不同机器是唯一的吗?它的值受到哪些因素影响?
MsgBox s
End Sub
[此贴子已经被作者于2005-4-11 17:50:26编辑过]
|