Что нового

Как в autoit определить видеокарту (ATI или NVIDIA)

vaf

Новичок
Добрый день уважаемые форумчане.
У меня вопрос.
Как при помощи autoit определить видеокарту (ATI или NVIDIA), а в идеале модель и количество памяти ?
 

InnI

AutoIT Гуру
Запустить "<...>\AutoIt3\Examples\COM\Scriptomatic.au3"
В списке "WMI Class" выбрать "Win32_VideoController"
Нажать "Run"
 

pvnn

Осваивающий
Код:
; Generated by AutoIt Scriptomatic

$wbemFlagReturnImmediately = 0x10
$wbemFlagForwardOnly = 0x20
$colItems = ""
$strComputer = "localhost"

$Output=""
$Output = $Output & "Computer: " & $strComputer  & @CRLF
$Output = $Output & "==========================================" & @CRLF
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_VideoController", "WQL", _
                                          $wbemFlagReturnImmediately + $wbemFlagForwardOnly)

If IsObj($colItems) then
   For $objItem In $colItems
      $strAcceleratorCapabilities = $objItem.AcceleratorCapabilities(0)
      $Output = $Output & "AcceleratorCapabilities: " & $strAcceleratorCapabilities & @CRLF
      $Output = $Output & "AdapterCompatibility: " & $objItem.AdapterCompatibility & @CRLF
      $Output = $Output & "AdapterDACType: " & $objItem.AdapterDACType & @CRLF
      $Output = $Output & "AdapterRAM: " & $objItem.AdapterRAM & @CRLF
      $Output = $Output & "Availability: " & $objItem.Availability & @CRLF
      $strCapabilityDescriptions = $objItem.CapabilityDescriptions(0)
      $Output = $Output & "CapabilityDescriptions: " & $strCapabilityDescriptions & @CRLF
      $Output = $Output & "Caption: " & $objItem.Caption & @CRLF
      $Output = $Output & "ColorTableEntries: " & $objItem.ColorTableEntries & @CRLF
      $Output = $Output & "ConfigManagerErrorCode: " & $objItem.ConfigManagerErrorCode & @CRLF
      $Output = $Output & "ConfigManagerUserConfig: " & $objItem.ConfigManagerUserConfig & @CRLF
      $Output = $Output & "CreationClassName: " & $objItem.CreationClassName & @CRLF
      $Output = $Output & "CurrentBitsPerPixel: " & $objItem.CurrentBitsPerPixel & @CRLF
      $Output = $Output & "CurrentHorizontalResolution: " & $objItem.CurrentHorizontalResolution & @CRLF
      $Output = $Output & "CurrentNumberOfColors: " & $objItem.CurrentNumberOfColors & @CRLF
      $Output = $Output & "CurrentNumberOfColumns: " & $objItem.CurrentNumberOfColumns & @CRLF
      $Output = $Output & "CurrentNumberOfRows: " & $objItem.CurrentNumberOfRows & @CRLF
      $Output = $Output & "CurrentRefreshRate: " & $objItem.CurrentRefreshRate & @CRLF
      $Output = $Output & "CurrentScanMode: " & $objItem.CurrentScanMode & @CRLF
      $Output = $Output & "CurrentVerticalResolution: " & $objItem.CurrentVerticalResolution & @CRLF
      $Output = $Output & "Description: " & $objItem.Description & @CRLF
      $Output = $Output & "DeviceID: " & $objItem.DeviceID & @CRLF
      $Output = $Output & "DeviceSpecificPens: " & $objItem.DeviceSpecificPens & @CRLF
      $Output = $Output & "DitherType: " & $objItem.DitherType & @CRLF
      $Output = $Output & "DriverDate: " & WMIDateStringToDate($objItem.DriverDate) & @CRLF
      $Output = $Output & "DriverVersion: " & $objItem.DriverVersion & @CRLF
      $Output = $Output & "ErrorCleared: " & $objItem.ErrorCleared & @CRLF
      $Output = $Output & "ErrorDescription: " & $objItem.ErrorDescription & @CRLF
      $Output = $Output & "ICMIntent: " & $objItem.ICMIntent & @CRLF
      $Output = $Output & "ICMMethod: " & $objItem.ICMMethod & @CRLF
      $Output = $Output & "InfFilename: " & $objItem.InfFilename & @CRLF
      $Output = $Output & "InfSection: " & $objItem.InfSection & @CRLF
      $Output = $Output & "InstallDate: " & WMIDateStringToDate($objItem.InstallDate) & @CRLF
      $Output = $Output & "InstalledDisplayDrivers: " & $objItem.InstalledDisplayDrivers & @CRLF
      $Output = $Output & "LastErrorCode: " & $objItem.LastErrorCode & @CRLF
      $Output = $Output & "MaxMemorySupported: " & $objItem.MaxMemorySupported & @CRLF
      $Output = $Output & "MaxNumberControlled: " & $objItem.MaxNumberControlled & @CRLF
      $Output = $Output & "MaxRefreshRate: " & $objItem.MaxRefreshRate & @CRLF
      $Output = $Output & "MinRefreshRate: " & $objItem.MinRefreshRate & @CRLF
      $Output = $Output & "Monochrome: " & $objItem.Monochrome & @CRLF
      $Output = $Output & "Name: " & $objItem.Name & @CRLF
      $Output = $Output & "NumberOfColorPlanes: " & $objItem.NumberOfColorPlanes & @CRLF
      $Output = $Output & "NumberOfVideoPages: " & $objItem.NumberOfVideoPages & @CRLF
      $Output = $Output & "PNPDeviceID: " & $objItem.PNPDeviceID & @CRLF
      $strPowerManagementCapabilities = $objItem.PowerManagementCapabilities(0)
      $Output = $Output & "PowerManagementCapabilities: " & $strPowerManagementCapabilities & @CRLF
      $Output = $Output & "PowerManagementSupported: " & $objItem.PowerManagementSupported & @CRLF
      $Output = $Output & "ProtocolSupported: " & $objItem.ProtocolSupported & @CRLF
      $Output = $Output & "ReservedSystemPaletteEntries: " & $objItem.ReservedSystemPaletteEntries & @CRLF
      $Output = $Output & "SpecificationVersion: " & $objItem.SpecificationVersion & @CRLF
      $Output = $Output & "Status: " & $objItem.Status & @CRLF
      $Output = $Output & "StatusInfo: " & $objItem.StatusInfo & @CRLF
      $Output = $Output & "SystemCreationClassName: " & $objItem.SystemCreationClassName & @CRLF
      $Output = $Output & "SystemName: " & $objItem.SystemName & @CRLF
      $Output = $Output & "SystemPaletteEntries: " & $objItem.SystemPaletteEntries & @CRLF
      $Output = $Output & "TimeOfLastReset: " & WMIDateStringToDate($objItem.TimeOfLastReset) & @CRLF
      $Output = $Output & "VideoArchitecture: " & $objItem.VideoArchitecture & @CRLF
      $Output = $Output & "VideoMemoryType: " & $objItem.VideoMemoryType & @CRLF
      $Output = $Output & "VideoMode: " & $objItem.VideoMode & @CRLF
      $Output = $Output & "VideoModeDescription: " & $objItem.VideoModeDescription & @CRLF
      $Output = $Output & "VideoProcessor: " & $objItem.VideoProcessor & @CRLF
      if Msgbox(1,"WMI Output",$Output) = 2 then ExitLoop
      $Output=""
   Next
Else
   Msgbox(0,"WMI Output","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
 

cdjsend

Новичок
$Output = $Output & "DriverDate: " & WMIDateStringToDate($objItem.DriverDate) & @CRLF

подскажите, если у меня 2 видеокарты, встроенная и дискретная, эта команда получает 2 даты, как мне отделить дату дискретной карты?
 
Верх