F Mckinnon
F Mckinnon

Reputation: 407

Batch to toggle between showing 1 or 2 monitors

I am currently looking to create a script which will automatically change the 'Multiple Displays' settings in the display settings tab. I would like the script to change the currently selected mode form 'Extend these displays' to 'Show only 2'.

Is this specifically possible? Any help or guidance to point me in a direction is welcome, thank you in advance.


Edit:

The menu in question is this one: Multiple Display Settings

Found through the Display Settings menu

Upvotes: 7

Views: 8545

Answers (1)

PyWin
PyWin

Reputation: 181

This can be done using the DisplaySwitch.exe utility that is in your system path (%windir%\System32\DisplaySwitch.exe).
"2" is your external display. To show you screen on this display only use:

DisplaySwitch.exe /external

Other possible command line options are:

/internal = switch to computer display only
/clone = switch to duplicate display
/extend = swtich to extend display

Calling DisplaySwitch.exe without parameters opens the display switch window.

Upvotes: 16

Related Questions