Set board=wmi.instancesof("win32_baseboard") For Each b In board msg="主板:"b.ManufacturervbTabb.productvbTabChr(13) Next msg=msgChr(13)"---"+Chr(13)
Set cpus=wmi.instancesof("win32_processor") msg=msg"CPU 特征:"+Chr(13) For Each cpu In cpus msg=msg+cpu.deviceidvbTabcpu.nameChr(13) _ vbtabcpu.SocketDesignationvbtabcpu.CurrentClockSpeed"MHz"vbtabcpu.l2cachesize"Kb_L2"Chr(13) Next msg=msgChr(13)"---"+Chr(13)
Set mem=wmi.instancesof("win32_physicalmemory") msg=msg"内存容量:"+Chr(13) For Each m In mem msg=msgm.tagspace(10)m.capacity+Chr(13) Next
Set mem=wmi.instancesof("win32_computersystem") For Each m In mem msg=msg"内存总容量:"Round((m.totalphysicalmemory/1024^2),2)"M"+Chr(13) Next msg=msgChr(13)"---"+Chr(13)
Set display=wmi.instancesof("Win32_videocontroller") msg=msg"显示系统:"+Chr(13) For Each video In display msg=msgvideo.deviceidvbTabvideo.nameChr(13) Next msg=msgChr(13)"---"+Chr(13)
Set disks=wmi.instancesof("win32_diskdrive") msg=msg"硬盘容量:"+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" 空间为: "nChr(13) Next msg=msgChr(13)"---"+Chr(13)