自 :
1. 獲取主機板序列號(注意並不是所有的主機板都可以獲得)
[vb]view plain
copy
sub 主機板序列號()
dim objs as
object, obj as
object, wmi as
object, 主機板序列號
set wmi = getobject("winmgmts:")
set objs = wmi.instancesof("win32_baseboard")
foreach obj in objs
msgbox "您的主機板序列號是:" + obj.serialnumber
next
endsub
2. 顯示顯示卡資訊
[vb]view plain
copy
sub 顯示卡資訊()
onerror
resume
next
dim tmp1, tmp2
set tmp2 = getobject("winmgmts:").instancesof("win32_videocontroller")
foreach tmp1 in tmp2
msgbox "型 號: " & tmp1.videoprocessor & vbcrlf & "廠 商: " & tmp1.adaptercompatibility & vbcrlf & "名 稱: " & tmp1.name & vbcrlf & "狀 態: " & tmp1.status & vbcrlf & "顯 存: " & (tmp1.adapterram / 1024000) & "mb" & vbcrlf & "驅 動(dll): " & tmp1.installeddisplaydrivers & vbcrlf & "驅 動(inf): " & tmp1.inffilename & vbcrlf & "版 本: " & tmp1.driverversion
next
endsub
3. 顯示網絡卡資訊
[vb]view plain
copy
sub 網絡卡mac()
dim 網絡卡
set 網絡卡 = getobject("winmgmts:").instancesof("win32_networkadapterconfiguration")
foreach 位址 in 網絡卡
if 位址.ipenabled = true
then
exit
forend
ifnext
endsub
4. 顯示硬碟型號
[vb]view plain
copy
sub 硬碟型號()
dim 硬碟
set 硬碟 = getobject("winmgmts:").instancesof("win32_diskdrive")
foreach mo in 硬碟
msgbox "硬碟型號為:" & mo.model
next
endsub
5.顯示cpu序列號
[vb]view plain
copy
sub cpu序列號()
foreach 序列 in getobject("winmgmts:").instancesof("win32_processor")
msgbox "cpu 序列號: " & cstr(序列.processorid)
next
endsub
6.顯示所有進行資訊
[vb]view plain
copy
sub 所有程序()
set objs = getobject("winmgmts:").instancesof("win32_process")
foreach obj in objs
tmp = tmp & worksheetfunction.text(a + 1, "[dbnum2][$-804]0: ") + vbtab + obj.description + chr(13)
a = a + 1
next
msgbox tmp, 65, "提示你哦"
endsub
獲取電腦硬體資訊
csharp csharp csharp csharp using system using system.collections using system.management namespace hardwareinfos public static hashtable getallinfos ...
C 獲取電腦硬體資訊
獲取cpu編號 view plaincopy to clipboardprint?managementclass mc new managementclass win32 processor managementobjectcollection moc mc.getinstances string ...
vbs wmi獲取電腦硬體資訊例項
set wmi getobject winmgmts 程式設計客棧 setoepgjpyab board wmi.instancesof win32 baseboard for each b in board msg 主機板 b.manufacturer vbtab b.product vbtab ...