Windows batch file to change monitor settings

12,317

Try reschangecon (yes, there is a console version!). It is safe, because it won't let you set settings that are not supported (without the force flag).

http://www.12noon.com/displaychanger.htm (It is free for personal use)

Share:
12,317
Faken
Author by

Faken

Updated on June 14, 2022

Comments

  • Faken
    Faken almost 2 years

    I have a desktop computer that is hooked up to 3 different monitors of which only two can be active at any one time. One is a primary monitor and is always active. I can manually switch between the other two: one a monitor, another an HDTV.

    The switch is a mechanical switch which only handles VGA (and at that, only the RGB components are actually switched) so there is no feedback to the computer from the other devices, thus windows can not make any automatic adjustments to change resolutions and things like that.

    I want to make a batch file that will automatically switch the screen configurations and resolutions (hard coding the proper resolutions of course since we can't detect the other devices anyways) so that they are correct for the displays.

    Where is the best place to get started? Where can I find library of commands (or whatever they are called) to do something like this? Lastly, is there anything I should be careful about when attempting something like this?

    Thanks in advance,

    -Faken