最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

vbs wmi獲取電腦硬件信息實例

 更新時間:2008年06月20日 19:29:56   作者:  
用vbs+wmi實現(xiàn)獲取電腦硬件信息的代碼,真的不錯,方便查看系統(tǒng)硬件信息
Set wmi=GetObject("winmgmts:\\")

Set board=wmi.instancesof("win32_baseboard")
For Each b In board
msg="主板:"&b.Manufacturer&vbTab&b.product&vbTab&Chr(13)
Next
msg=msg&Chr(13)&"---"+Chr(13)

Set cpus=wmi.instancesof("win32_processor")
msg=msg&"CPU 特征:"+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&"內存容量:"+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&"內存總容量:"&Round((m.totalphysicalmemory/1024^2),2)&"M"+Chr(13)
Next
msg=msg&Chr(13)&"---"+Chr(13)

Set display=wmi.instancesof("Win32_videocontroller")
msg=msg&"顯示系統(tǒng):"+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&"硬盤容量:"+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&"      空間為: "&n&Chr(13)
Next
msg=msg&Chr(13)&"---"+Chr(13)


MsgBox msg,0,"電腦基本特征"

相關文章

最新評論

星子县| 大新县| 成都市| 恩平市| 兰溪市| 黄梅县| 萝北县| 大埔区| 炉霍县| 东丰县| 巴南区| 上栗县| 胶州市| 岳普湖县| 马公市| 武穴市| 永新县| 玛纳斯县| 姚安县| 北辰区| 高碑店市| 布拖县| 于田县| 民和| 罗源县| 张家界市| 沅江市| 同仁县| 乡宁县| 平果县| 九龙县| 五家渠市| 惠来县| 罗城| 天祝| 四会市| 长治市| 行唐县| 永川市| 墨竹工卡县| 玛纳斯县|