mfknui 发表于 2008-12-27 13:44:34

硬件查看简单版,三恨来一下

$colVideoinfo = $objWMIService.ExecQuery("Select * from Win32_VideoController")
这里显卡只能获得是SurFilter Display Driver
怎么才能获得像6600GT这样的型号啊

[ 本帖最后由 mfknui 于 2009-1-5 13:57 编辑 ]

mfknui 发表于 2008-12-28 18:45:49

知道的说一下啊,郁闷

bing614 发表于 2008-12-28 19:33:09

; 生成于 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

sanhen 发表于 2008-12-28 20:06:14

WMI获取硬件信息并不是很准确的。。。有时候会返回空的。。。

所以我的新版采用的EVEREST核心来获取了。

mfknui 发表于 2009-1-5 13:57:55

谢谢三楼的朋友

vipanjimtim 发表于 2015-3-24 16:01:04

人家来了你也不谢谢人家

gwgelin 发表于 2015-4-12 12:55:40

虽然我这简单的回复属于灌水,但也是对楼主莫大的支持
页: [1]
查看完整版本: 硬件查看简单版,三恨来一下