Way to change Windows (7) monitors settings via script

Maddog picture Maddog · Sep 8, 2012 · Viewed 28.5k times · Source

i bought a new TV mainly as second monitor to my PC and I often need to change settings (extend display for movies, duplicate display for gaming, disable for work'n'browsing).

Is there a way to switch among those settings via some script (batch most likely or VBS, whatever) so I dont't need to crawl through GUI all the time? I am veeery lazy... Thanks

Answer

SmithMart picture SmithMart · Sep 10, 2012

Firstly, not sure if you know the shortcut

Windows + P

2 buttons seems pretty easy!

but, you could write a batch file to run the programs with the appication displayswitch.exe included. displayswitch comes with windows 7 so you can have a batch file with:

DisplaySwitch.exe /external
notepad.exe

then use this batch file to open notepad and it will always open and switch to the external display only.

the following options are available:

Extend Display
DisplaySwitch.exe /extend

2nd monitor
DisplaySwitch.exe /external

Computers Monitor
DisplaySwitch.exe /internal

Duplicate Display
DisplaySwitch.exe /clone

Martyn