[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 編輯過 |
關鍵字查詢
相關文章
正在查詢... |