I need to get a text output with the video card / GPU model, using any tool existing in all Windows versions from XP onwards (unlikely, I haven't found anything yet) or using any small command line third party tool.
Any ideas?
15 Answers
wmic path win32_VideoController get name does the job concisely from commmand line. Thanks to Vlastimil Ovčáčík's answer above but not sure why its so verbose.
4Run from batch:
@echo off
for /F "tokens=* skip=1" %%n in ('WMIC path Win32_VideoController get Name ^| findstr "."') do set GPU_NAME=%%n
echo %GPU_NAME% 4 - Copy this and save to your desktop as videoCardScript.ps1
- Click Start then type
powershelland then press enter - type
cd ~\Desktopthen press enter - type
videoCardScript.ps1then press enter - note: if you receive an error mentioning ...cannot be loaded because running scripts is disabled on this system. you may need to change your execution policy with the following command in powershell:
Set-ExecutionPolicy unrestricted. ****Ensure you do the following command when complete to maintain the security of your system:**
Set-ExecutionPolicy restricteddxdiag /x dxoutput.xml | Out-Null #Out-Null here ensures the process here has been created before proceeding [xml]$xmldata = get-content "dxoutput.xml" $xmldata.DxDiag.DisplayDevices.DisplayDevice| % { $name=$_.CardName $manu=$_.Manufacturer $chip=$_.ChipType $type=$_.OutputType $version=$_.DriverVersion write-host "Name: `t`t`t $name" write-host "Manufacturer: `t`t $manu" write-host "Chip Type: `t`t $chip" write-host "Output Type: `t`t $type" write-host "Driver Version: `t $version" } del dxoutput.xml
If you're interested in getting more info you can comment out the del dxoutput.xml command by adding a # in front of it. You can then look at the contents of the xml file that's saved to your desktop and can adjust accordingly. If you want to remove some info in the script you can always comment out those specific lines or remove them entirely.
PS- you may see multiple of the same cards. There's a reason I have the Output Type included here: a card will show multiples based on how many outputs it can support. In my case mine shows DVI (self explanatory) and HD15 (which is VGA).
PSS- I ran this on a Windows 8 machine. There's a possibility you may need to install powershell on the XP machines. They'll need to have Service Pack 3 installed and then you can install Powershell from here: (Windows Management Framework (Windows PowerShell 2.0, WinRM 2.0, and BITS 4.0))
0copy this code into a .VBS file and run it with cscript.exe:
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery( _ "SELECT * FROM Win32_VideoController",,48)
For Each objItem in colItems Wscript.Echo "-----------------------------------" Wscript.Echo "Win32_VideoController instance" Wscript.Echo "-----------------------------------" Wscript.Echo "Caption: " & objItem.Caption
NextHere is the output of my Dell Laptop:
-----------------------------------
Win32_VideoController instance
-----------------------------------
Caption: Intel(R) HD Graphics 4000
-----------------------------------
Win32_VideoController instance
-----------------------------------
Caption: AMD Radeon HD 7700M Series Run in Command Prompt:
wmic path win32_VideoController get /all /format:htable >> c:\VGA.html 4