Set wmi = GetObject ("winmgmts :\\")
Set board = wmi. instancesof ("win32_baseboard ")
For Each B In board
Msg = "motherboard:" & B. Manufacturer & vbTab & B. product & vbTab & Chr (13)
Next
Msg = msg & Chr (13) & "---" + Chr (13)
Set cpus = wmi. instancesof ("win32_processor ")
Msg = msg & "CPU features:" + Chr (13)
For Each cpu In cpus
Msg = msg + cpu. deviceid & vbTab & cpu. name & Chr (13 )_
& Vbtab & cpu. SocketDesignation & vbtab & cpu. CurrentClockSpeed & "MHz" & vbtab & cpu. l2cachesize & "Kb_L2" & Chr (13)
Next
Msg = msg & Chr (13) & "---" + Chr (13)
Set mem = wmi. instancesof ("win32_physicalmemory ")
Msg = msg & "memory capacity:" + Chr (13)
For Each m In mem
Msg = msg & m. tag & space (10) & m. capacity & + Chr (13)
Next
Set mem = wmi. instancesof ("win32_computersystem ")
For Each m In mem
Msg = msg & "total memory capacity:" & Round (m. totalphysicalmemory/1024 ^ 2), 2) & "M" + Chr (13)
Next
Msg = msg & Chr (13) & "---" + Chr (13)
Set display = wmi. instancesof ("Win32_videocontroller ")
Msg = msg & "Display System:" + Chr (13)
For Each video In display
Msg = msg & video. deviceid & vbTab & video. name & Chr (13)
Next
Msg = msg & Chr (13) & "---" + Chr (13)
Set disks = wmi. instancesof ("win32_diskdrive ")
Msg = msg & "hard disk capacity:" + Chr (13)
For Each d In disks
If int (d. size/(1024 ^ 3) = 0 Then
N = Round (d. size/(1024 ^ 2), 2) & "M"
Else
N = Round (d. size/(1024 ^ 3), 2) & "G"
End If
Msg = msg + d. deviceid & "Space:" & n & Chr (13)
Next
Msg = msg & Chr (13) & "---" + Chr (13)
MsgBox msg, 0, "basic computer features"