#include <WinAPIEx.au3>
$aCore = _WinAPI_GetSystemInfo()
Global Const $wbemFlagReturnImmediately = 0x10
Global Const $wbemFlagReturnWhenComplete = 0x0
Global Const $wbemFlagBidirectional = 0x0
Global Const $wbemFlagForwardOnly = 0x20
Global Const $wbemFlagNoErrorObject = 0x40
Global Const $wbemFlagReturnErrorObject = 0x0
Global Const $wbemFlagSendStatus = 0x80
Global Const $wbemFlagDontSendStatus = 0x0
Global Const $wbemFlagUseAmendedQualifiers = 0x20000
_Example()
Func _VideoController_GetName()
Local $oWMI = ObjGet("winmgmts:\\.\root\CIMV2")
If Not IsObj($oWMI) Then Return SetError(1, 0, 0)
Local $oItems = $oWMI.ExecQuery("SELECT * FROM Win32_VideoController", "WQL", BitOR($wbemFlagReturnImmediately, $wbemFlagForwardOnly)), $sOut
If Not IsObj($oItems) Then Return SetError(2, 0, 0)
For $oIt In $oItems
$sOut &= $oIt.Name & @LF
Next
StringTrimRight($sOut, 1)
Return SetError(0, 0, $sOut)
EndFunc ;==>_VideoController_GetName
Func _Example()
#cs
AcceleratorCapabilities
CapabilityDescriptions
PowerManagementCapabilities
#ce
Local $oWMI = ObjGet("winmgmts:\\.\root\CIMV2")
If Not IsObj($oWMI) Then Return ConsoleWrite("--> Error 1" & @LF)
Local $oItems = $oWMI.ExecQuery("SELECT * FROM Win32_VideoController", "WQL", BitOR($wbemFlagReturnImmediately, $wbemFlagForwardOnly))
If Not IsObj($oItems) Then Return ConsoleWrite("--> Error 2" & @LF)
For $oIt In $oItems
ConsoleWrite("++> AdapterCompatibility: " & $oIt.AdapterCompatibility & @LF & _
"++> AdapterDACType: " & $oIt.AdapterDACType & @LF & _
"++> AdapterRAM: " & $oIt.AdapterRAM & @LF & _
"++> Availability: " & $oIt.Availability & @LF & _
"++> Caption: " & $oIt.Caption & @LF & _
"++> ColorTableEntries: " & $oIt.ColorTableEntries & @LF & _
"++> ConfigManagerErrorCode: " & $oIt.ConfigManagerErrorCode & @LF & _
"++> ConfigManagerUserConfig: " & $oIt.ConfigManagerUserConfig & @LF & _
"++> CreationClassName: " & $oIt.CreationClassName & @LF & _
"++> CurrentBitsPerPixel: " & $oIt.CurrentBitsPerPixel & @LF & _
"++> CurrentHorizontalResolution: " & $oIt.CurrentHorizontalResolution & @LF & _
"++> CurrentNumberOfColors: " & $oIt.CurrentNumberOfColors & @LF & _
"++> CurrentNumberOfColumns: " & $oIt.CurrentNumberOfColumns & @LF & _
"++> CurrentNumberOfRows: " & $oIt.CurrentNumberOfRows & @LF & _
"++> CurrentRefreshRate: " & $oIt.CurrentRefreshRate & @LF & _
"++> CurrentScanMode: " & $oIt.CurrentScanMode & @LF & _
"++> CurrentVerticalResolution: " & $oIt.CurrentVerticalResolution & @LF & _
"++> Description: " & $oIt.Description & @LF & _
"++> DeviceID: " & $oIt.DeviceID & @LF & _
"++> DeviceSpecificPens: " & $oIt.DeviceSpecificPens & @LF & _
"++> DitherType: " & $oIt.DitherType & @LF & _
"++> DriverDate: " & $oIt.DriverDate & @LF & _
"++> DriverVersion: " & $oIt.DriverVersion & @LF & _
"++> ErrorCleared: " & $oIt.ErrorCleared & @LF & _
"++> ErrorDescription: " & $oIt.ErrorDescription & @LF & _
"++> ICMIntent: " & $oIt.ICMIntent & @LF & _
"++> ICMMethod: " & $oIt.ICMMethod & @LF & _
"++> InfFilename: " & $oIt.InfFilename & @LF & _
"++> InfSection: " & $oIt.InfSection & @LF & _
"++> InstallDate: " & $oIt.InstallDate & @LF & _
"++> InstalledDisplayDrivers: " & $oIt.InstalledDisplayDrivers & @LF & _
"++> LastErrorCode: " & $oIt.LastErrorCode & @LF & _
"++> MaxMemorySupported: " & $oIt.MaxMemorySupported & @LF & _
"++> MaxNumberControlled: " & $oIt.MaxNumberControlled & @LF & _
"++> MaxRefreshRate: " & $oIt.MaxRefreshRate & @LF & _
"++> MinRefreshRate: " & $oIt.MinRefreshRate & @LF & _
"++> Monochrome: " & $oIt.Monochrome & @LF & _
"++> Name: " & $oIt.Name & @LF & _
"++> NumberOfColorPlanes: " & $oIt.NumberOfColorPlanes & @LF & _
"++> NumberOfVideoPages: " & $oIt.NumberOfVideoPages & @LF & _
"++> PNPDeviceID: " & $oIt.PNPDeviceID & @LF & _
"++> PowerManagementSupported: " & $oIt.PowerManagementSupported & @LF & _
"++> ProtocolSupported: " & $oIt.ProtocolSupported & @LF & _
"++> ReservedSystemPaletteEntries: " & $oIt.ReservedSystemPaletteEntries & @LF & _
"++> SpecificationVersion: " & $oIt.SpecificationVersion & @LF & _
"++> Status: " & $oIt.Status & @LF & _
"++> StatusInfo: " & $oIt.StatusInfo & @LF & _
"++> SystemCreationClassName: " & $oIt.SystemCreationClassName & @LF & _
"++> SystemName: " & $oIt.SystemName & @LF & _
"++> SystemPaletteEntries: " & $oIt.SystemPaletteEntries & @LF & _
"++> TimeOfLastReset: " & $oIt.TimeOfLastReset & @LF & _
"++> VideoArchitecture: " & $oIt.VideoArchitecture & @LF & _
"++> VideoMemoryType: " & $oIt.VideoMemoryType & @LF & _
"++> VideoMode: " & $oIt.VideoMode & @LF & _
"++> VideoModeDescription: " & $oIt.VideoModeDescription & @LF & _
"++> VideoProcessor: " & $oIt.VideoProcessor & @LF)
Next
EndFunc ;==>_Example
$objService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\CIMV2")
$aRam = 0
If IsObj($objService) Then
For $objPhMem In $objService.ExecQuery("SELECT * FROM Win32_PhysicalMemory")
$aRam = $aRam + $objPhMem.Capacity / (1024*1024*1024)
Next
Else
ConsoleWrite("Ошибка создания объекта" & @CRLF)
EndIf
MsgBox(0, "Info", 'PC Name | ' & @ComputerName & @LF & 'Core | ' & $aCore[5] & @LF & 'RAM | ' & $aRam & " GB" & @LF & 'CPU Arch. | ' & @CPUArch & @LF & 'OS | ' & @OSVersion & " " & @OSServicePack & 'Build ' & @OSBuild & " " & @OSArch & @LF & 'Video | ' & _VideoController_GetName())