Reputation: 51
Essentially I want to make a batch file that will, when executed, swap between two states. the first state would be a duplicate monitor setting, whereas the computer will display the same thing on two screens, while the other setting would be a new monitor, so you could see two different things on the two monitors. I don't know a command that could do this, but it should be possible. I tried looking it up, but could find nothing relevant.
Upvotes: 4
Views: 6897
Reputation: 41
As long as you're on Windows 7+
DisplaySwitch.exe /clone
will duplicate displays.
This will extend displays:
DisplaySwitch.exe /extend
Hope this helps.
Also you can use Win+P if you want a quick shortcut.
Upvotes: 4
Reputation: 4434
There is no general solution for this using batch-files. However Nvidia drivers do provide a option fore this, it may be possible that other manufacturers have similar documents. I however would not know because all machines I work with have Nvidia cards.
The documentation can be found here. As per nvidia documentation to set dual monitor mode would be:
rundll32.exe setview 1 dualview AA DA
And setting both views the same would be:
rundll32.exe NvCpl.dll,dtcfg setview 2 clone AA DA
Upvotes: 0