用于更改显示器设置的 Windows 批处理文件
我有一台台式计算机,连接了 3 个不同的显示器,其中任何一次只能激活两个显示器。其中一个是主监视器并且始终处于活动状态。我可以在另外两个之间手动切换:一个是显示器,另一个是高清电视。
该开关是一个机械开关,仅处理 VGA(并且实际上仅切换 RGB 分量),因此其他设备不会向计算机提供反馈,因此 Windows 无法进行任何自动调整来更改分辨率等那。
我想制作一个批处理文件,它将自动切换屏幕配置和分辨率(当然,对正确的分辨率进行硬编码,因为我们无论如何都无法检测到其他设备),以便它们对于显示器来说是正确的。
最好从哪里开始?我在哪里可以找到命令库(或它们的名称)来执行类似的操作?最后,尝试这样的事情时有什么需要注意的吗?
预先感谢,
-Faken
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试 reschangecon(是的,有控制台版本!)。
它是安全的,因为它不会让您设置不支持的设置(没有强制标志)。
http://www.12noon.com/displaychanger.htm(免费供个人使用)
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)
我在我朋友的 HTPC 上使用 ResSwitch 来执行此操作,该 HTPC 经常忘记驱动电视的分辨率,您可以这样称呼它: resswitch.exe 1920 1080 32 60
http://www.naughter.com/qres.html
风险是它不会要求您确认,因此您最好确保您的显示器可以处理您要求的分辨率。
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.