How to get GUID ID to change display setting

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
thecoco20
Posts: 1
Joined: 31 Mar 2011 08:39

How to get GUID ID to change display setting

#1 Post by thecoco20 » 31 Mar 2011 08:48

Hey,

I'm trying to find the way to get GUIDs number of my display to change the setting by a batch.

So, that I tried and isn't working:
FOR /F "tokens=2 delims={}" %%a in ('REG QUERY "HKLM\SYSTEM\CurrentControlSet\Control\Video" /s /f') DO SET VIDEOCARD=%%a
ECHO Video Card GUID is: %VIDEOCARD%

Somebody can help me please

Thanks in advance

xl1000
Posts: 10
Joined: 01 Feb 2011 06:10

Re: How to get GUID ID to change display setting

#2 Post by xl1000 » 07 Apr 2011 09:53

How about this...

Code: Select all

@echo off

SET KEY=HKLM\SYSTEM\CurrentControlSet\Control\Video

REG.EXE QUERY %KEY%> video_reg.txt

FOR /F "tokens=1,2,3,4,5,6 delims=\" %%i IN ( video_reg.txt ) DO (
   REM ECHO %%m - %%n
   IF "%%n" NEQ "" ECHO Video Card GUID present: %%n
)


or without the {} chars included

Code: Select all

@echo off

SET KEY=HKLM\SYSTEM\CurrentControlSet\Control\Video

REG.EXE QUERY %KEY%> video_reg.txt

FOR /F "tokens=1,2,* delims={}" %%i IN ( video_reg.txt ) DO (
   REM ECHO %%i - %%j - %%k
   IF "%%j" NEQ "" ECHO Video Card GUID present: %%j
)

Post Reply