Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
还是你自己搞定吧,添加外部引用:system.management.dll
即可用下面的代码列出所有磁盘的型号和物理序列号:
Dim Wmi As New System.Management.ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive")
For Each Obj As System.Management.ManagementObject In Wmi.Get
If Obj("Model") IsNot Nothing Then
output.show( Obj("Model").ToString)
End If
If Obj("Signature") IsNot Nothing Then
output.show(Obj("Signature").ToString)
End If
Next
还是你自己搞定吧,添加外部引用:system.management.dll
即可用下面的代码列出所有磁盘的型号和物理序列号:
Dim Wmi As New System.Management.ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive")
For Each Obj As System.Management.ManagementObject In Wmi.Get
If Obj("Model") IsNot Nothing Then
output.show( Obj("Model").ToString)
End If
If Obj("Signature") IsNot Nothing Then
output.show(Obj("Signature").ToString)
End If
Next
运行的时候有错误提示。
注意前面一句话:
添加外部引用:system.management.dll
注意前面一句话:
添加外部引用:system.management.dll
找不到system.management.dll在什么地方添加。