views:

946

answers:

2

Hello everyone,

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

A: 

I've used ResSwitch to do this on my friend's HTPC that periodically forgot what resolution to drive his TV at, you call it like this: resswitch.exe 1920 1080 32 60

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

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

lod3n
+2  A: 

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)

Kalmi
OP, I would look in to this. You can't change your display resolution with DOS or Powershell commands, nor can you do it with .NET. You could write a Powershell script that wraps some .NET code that imports user32.dll (which has a resolution control API), but this tool already handles your problem.
fatcat1111