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?
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?
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.
for
works. It is very powerful and great for parsing lines of text ;)
wmic path win32_VideoController get driverVersion
will show driver version
Run 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%
powershell
and then press entercd ~\Desktop
then press entervideoCardScript.ps1
then press enterSet-ExecutionPolicy unrestricted
. ****Ensure you do the following command when complete to maintain the security of your system:** Set-ExecutionPolicy restricted
dxdiag /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: http://support.microsoft.com/kb/968929 (Windows Management Framework (Windows PowerShell 2.0, WinRM 2.0, and BITS 4.0))
copy 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
Next
Here 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
c:\VGA.html
from non admin user. Instead just change the path to VGA.html
to dump into the user dir. I agree though it's purpose should be explained in the question rather than down here in comment.