Several laptops now have two graphics cards and i need some help on how to add them to variables and output them onscreen or text file on a batch file.
On cmd i use wmic PATH Win32_videocontroller GET description
and it outputs two graphics:
- Description
NVIDIA GeForce MX150
Intel(R) UHD Graphics 620
- But if I use:
for /F "tokens=2 delims='='" %%A in ('wmic PATH Win32_videocontroller GET description /value') do set vga=%%A
echo %vga%
I just get the Intel(R) UHD Graphics 620
and not both graphics!
I need all available graphics card, so I can output them onscreen and on a file using the variables:
- Ex.
VGA1: NVIDIA GeForce MX150
VGA2: Intel(R) UHD Graphics 620
Thanks!
EDIT: I find a way to show both graphics, but I still don't know how to add them to separate variables :(
setlocal enabledelayedexpansion
set i=0
for /f "tokens=2 delims='='" %%a in ('wmic PATH Win32_videocontroller GET description /value ') do (
set /a i+=1
set VGA!i!=%%a
)
set VGA
It shows both cards, although I would prefer:
VGA1: NVIDIA... instead of VGA1=NVIDIA...
Replacing "=" by ": " but I also can't do it :(
VGA1=NVIDIA GeForce MX150
VGA2=Intel(R) UHD Graphics 620