硬件查看简单版,三恨来一下
$colVideoinfo = $objWMIService.ExecQuery("Select * from Win32_VideoController")这里显卡只能获得是SurFilter Display Driver
怎么才能获得像6600GT这样的型号啊
[ 本帖最后由 mfknui 于 2009-1-5 13:57 编辑 ] 知道的说一下啊,郁闷 ; 生成于 AutoIt Scriptomatic
$wbemFlagReturnImmediately = 0x10
$wbemFlagForwardOnly = 0x20
$colItems = ""
$strComputer = "localhost"
$Output=""
$Output = $Output & "Computer: " & $strComputer& @CRLF
$Output = $Output & "==========================================" & @CRLF
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_VideoController", "WQL", _
$wbemFlagReturnImmediately + $wbemFlagForwardOnly)
If IsObj($colItems) then
For $objItem In $colItems
$Output = $Output & "Description: " & $objItem.Description & @CRLF
if Msgbox(1,"WMI Output",$Output) = 2 then ExitLoop
$Output=""
Next
Else
Msgbox(0,"WMI 输出","No WMI Objects Found for class: " & "Win32_VideoController" )
Endif
Func WMIDateStringToDate($dtmDate)
Return (StringMid($dtmDate, 5, 2) & "/" & _
StringMid($dtmDate, 7, 2) & "/" & StringLeft($dtmDate, 4) _
& " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate,13, 2))
EndFunc WMI获取硬件信息并不是很准确的。。。有时候会返回空的。。。
所以我的新版采用的EVEREST核心来获取了。 谢谢三楼的朋友 人家来了你也不谢谢人家 虽然我这简单的回复属于灌水,但也是对楼主莫大的支持
页:
[1]