Windows 7 – Change Display Arrangement via Batch/Command Line

command linemultiple-monitorswindows 7

I want to change the Display Arrangement of my computer via Command line. I have 2 monitors set up, extending, and I want to change the monitors setup from Dual Display to Single Display and back via command line.

I've had a look through QRes and nircmd. While QRes lacks multimonitor support entirely, nircmd cannot disable a monitor, only change the primary state and the resolution of separate screens.

It would be appreciated if you know of a way to do that.

Edit: I will post my solution here using the display changer in climenoles answer:

@echo off
REM setting to single screen
echo *** Disabling Screen 2 *** 
cd C:\Program Files (x86)\12noon Display Changer\
dc64cmd.exe -monitor="\\.\DISPLAY2" -detach

echo Starting TF2 -fullscreen -novid -console -w 1920 -h 1200
REM Starting Team Fortress 2 fullscreen
cd C:\Program Files (x86)\Steam
Steam.exe -applaunch 440 -fullscreen -novid -console -w 1920 -h 1200

REM pausing because steam.exe returns before TF2 quits
echo Press a key to reenable Screen 2
pause
cd C:\Program Files (x86)\12noon Display Changer\
dc64cmd.exe -monitor="\\.\DISPLAY2" -secondary

Best Answer

This utility may help you: Display Changer :

«Display Changer changes the display resolution, runs a program, then restores the original settings. It can also change the resolution permanently and rearrange the monitors in a multiple-monitor setup»

Works in GUI or command line and it's free for personnal use...

http://12noon.com/?page_id=80

Hope this help. Let us know.

Related Question