Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共8 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:怎样得到U盘的物理序列号?

1楼
Avail 发表于:2011/5/26 21:20:00
用foxtable怎样得到U盘的物理序列号? 销售人员说可以实现。
2楼
狐狸爸爸 发表于:2011/5/26 23:09:00

看看这个:

http://www.datasoft.com.cn/dispbbs.asp?BoardID=2&ID=1620&replyID=11573&skin=1

 

3楼
狐狸爸爸 发表于:2011/5/26 23:18:00
补充一下,这个只能读第一个盘,通常也就是硬盘了,foxtable屏蔽了后续的盘,以后开通算了。
4楼
狐狸爸爸 发表于:2011/5/26 23:31:00

还是你自己搞定吧,添加外部引用: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

5楼
lihe60 发表于:2011/5/27 8:19:00
以下是引用狐狸爸爸在2011-5-26 23:31:00的发言:

还是你自己搞定吧,添加外部引用: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

运行的时候有错误提示。

6楼
狐狸爸爸 发表于:2011/5/27 8:47:00

注意前面一句话:

 

添加外部引用:system.management.dll

7楼
lihe60 发表于:2011/5/27 9:26:00
以下是引用狐狸爸爸在2011-5-27 8:47:00的发言:

注意前面一句话:

 

添加外部引用:system.management.dll

找不到system.management.dll在什么地方添加。

8楼
狐狸爸爸 发表于:2011/5/27 9:27:00

http://help.foxtable.com/topics/1936.htm

 

共8 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02344 s, 2 queries.