Windows Batch File to Change Monitor Settings

I have a desktop computer connected to three different monitors, of which only two can be active at any given time. One of them is the main monitor and is always active. I can switch between two others: one is a monitor, the other is an HDTV.

The switch is a mechanical switch that only handles VGA (and it actually only switches RGB components), so there is no feedback from the computer on other devices, so windows cannot make any automatic adjustments to change resolution and the like.

I want to make a batch file that will automatically switch screen and resolution configurations (hardcoding the correct resolutions since we can't detect other devices anyway) so that they are correct for displays.

Where is the best place to start? Where can I find a library of commands (or whatever they call it) to do something like this? Finally, is there anything I should be careful about when trying something like this?

Thanks in advance,

-Faken

+2


source to share


2 answers


Try reschangecon (yes there is a console version!). This is safe because it will prevent you from setting settings that are not supported (no force flag).



http://www.12noon.com/displaychanger.htm (it's free for personal use)

+5


source


I used ResSwitch to do this on my HTPC friend who periodically forgot what resolution to control his TV at, you call it this: resswitch.exe 1920 1080 32 60

http://www.naughter.com/qres.html



The risk is that it doesn't ask you for confirmation, so you better be sure that your monitor can handle the resolution you're asking for.

0


source







All Articles