MsgValue = ""
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")'获取硬盘序列号Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_PhysicalMedia", , 48)For Each objItem In colItemsMsgValue = MsgValue & vbCrLf & "硬盘 = " & objItem.SerialNumberNext'获取主板序列号Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard", , 48)For Each objItem In colItemsMsgValue = MsgValue & vbCrLf & "主板 = " & objItem.SerialNumberNext'获取CPU IDSet colItems = objWMIService.ExecQuery("Select * from Win32_Processor", , 48)For Each objItem In colItemsMsgValue = MsgValue & vbCrLf & "CPU = " & objItem.ProcessorIdNext'获取BIOS序列号Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS", , 48)For Each objItem In colItemsMsgValue = MsgValue & vbCrLf & "BIOS = " & objItem.SerialNumberNext'获取网卡MAC地址Set colItems = objWMIService.ExecQuery("SELECT MACAddress FROM Win32_NetworkAdapter WHERE ((MACAddress Is Not NULL) AND (Manufacturer <> 'Microsoft'))", , 48)For Each objItem In colItemsMsgValue = MsgValue & vbCrLf & "网卡 = " & objItem.MACAddressNextWscript.Echo MsgValue