怎么用ASP获取硬盘序列号?

来源:百度知道 编辑:UC知道 时间:2024/05/16 12:52:36
不是这个逻辑序列号,一格式化就变了,我要那个物理序列号!用ASP

<%
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 = "未知"
Case 1: t = "可移动"
Case 2: t = "固定"
Case 3: t = "网络"
Case 4: t = "CD-ROM"
Case 5: t = "RAM 磁盘"
End Select
s = "驱动器 " & d.DriveLetter & ": - " & t
s = s & vbCrLf & "序列号: " & d.SerialNumber
response.Write(s)
End Sub
call ShowDriveInfo("c:\")
%>