[VB]获取主板序列号的源代码
当前位置:点晴教程→知识管理交流
→『 技术文档交流 』
Option Explicit Private Sub Command1_Click()
On Error Resume Next Dim MsgValue As String Dim objWMIService As Object Dim objItem As Object, colItems As Object Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard", , 48) For Each objItem In colItems MsgValue = "Caption: " & objItem.Caption & vbCrLf & "SerialNumber: " & objItem.SerialNumber Next MsgBox MsgValue, , "MotherBoard Infomation" End Sub 该文章在 2013/11/14 18:30:12 编辑过 |
关键字查询
相关文章
正在查询... |