11
6
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
Your post actually gave me the idea for this feature I added to TvGameLauncher. Check it out if still relevant (See my answer below). – Ohad Schneider – 2014-07-12T17:58:08.110
Hey, I know this question is old but I want to know if there is a way to detect the presence of another monitor in Windows from Command line? – Durga Swaroop – 2016-07-21T06:00:18.827