Change Display Arrangement via Batch/Command Line on Windows 7

Big thanks to Bill Rodman's comment in this thread.

I combine this utility with the Windows7 DisplaySwitch.exe command: "C:\Windows\System32\DisplaySwitch.exe /internal" to switch exclusevely to the main monitor. – Bill Rodman Jan 29 '10 at 12:17

Testing this out, this calls and immediately selects the screen to choose via the.

  • /internal calls the internal screen (your primary display)
  • /external changes to the external screen (im not sure how well it handles when there is more than 1 screen)
  • /clone duplicates displays.
  • /extend switches to extended settings.

Since this is calling a file path, simply attach this to your batch script and baboom, instant and effective display changing. A good idea would be to string this togethor into windows Task Scheduler UI as you can call the file path, and give it the arguments, then whenever your TF2 event happens, the display will always switch.


You were close with NirCmd, but what you're looking for is Nir's MultiMonitorTool:

MultiMonitorTool is a small tool that allows you to do some actions related to working with multiple monitors. With MultiMonitorTool, you can disable/enable monitors, set the primary monitor, save and load the configuration of all monitors, and move windows from one monitor to another. You can do these actions from the user interface or from command-line, without displaying user interface. MultiMonitorTool also provides a preview window, which allows you to watch a preview of every monitor on your system.

The 12noon tool looks nice, but barring an official MS tool, I'll take NirSoft over any other tool any day.

Shameless plug: You may be interested in the TvGameLauncher tool I wrote for exactly this purpose (switching primary displays for playing games). It can also switch to HDMI audio and prevent the screensaver from popping up while you're playing (without disabling it). It even supports the Steam protocol (Steam://) so you don't have to use the pause trick. It doesn't support disabling your other monitors though, but I'll add that to my todo list (I have some other cool features coming up like automatic TV shortcut generation).

Edit - all features added. Check it out!


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.