如何在批处理文件中交换我的主显示器?
How can I swap my primary monitor in a batch file?
一切都在标题中,我已经使用 Display Changer 进行了测试,但没有成功,因为我的显示器都被命名为 "Generic PnP Monitor",所以我不能说必须将哪个屏幕设置为主屏幕。我已经看到我需要下载 drivers 来为我的显示器命名,但我的两个显示器都没有 driver 用于 Windows 10。我认为必须有一种简单地将主屏幕交换到另一个屏幕或类似方式的方法,但我还没有看到有人这样做。
也许您可以尝试 nircmd.exe,这是一个小巧但功能强大的命令行实用程序。
http://www.nirsoft.net/utils/nircmd.html
setdisplay {monitor:index/name} [width] [height] [color bits] {refresh rate} {-updatereg} {-allusers}
....... You can specify the monitor by index (0 for the first monitor, 1 for the second one, and so on) or by specifying a string in the system monitor name...........
另一个解决方案是使用多显示器工具,因为它允许更多的切换显示器的功能,例如移动 windows。还有一个更简单的命令来完成手头的基本任务。
http://www.nirsoft.net/utils/multi_monitor_tool.html
/SetPrimary <Monitor>
Set the primary monitor.
Example:
MultiMonitorTool.exe /SetPrimary 2
一切都在标题中,我已经使用 Display Changer 进行了测试,但没有成功,因为我的显示器都被命名为 "Generic PnP Monitor",所以我不能说必须将哪个屏幕设置为主屏幕。我已经看到我需要下载 drivers 来为我的显示器命名,但我的两个显示器都没有 driver 用于 Windows 10。我认为必须有一种简单地将主屏幕交换到另一个屏幕或类似方式的方法,但我还没有看到有人这样做。
也许您可以尝试 nircmd.exe,这是一个小巧但功能强大的命令行实用程序。
http://www.nirsoft.net/utils/nircmd.html
setdisplay {monitor:index/name} [width] [height] [color bits] {refresh rate} {-updatereg} {-allusers}
....... You can specify the monitor by index (0 for the first monitor, 1 for the second one, and so on) or by specifying a string in the system monitor name...........
另一个解决方案是使用多显示器工具,因为它允许更多的切换显示器的功能,例如移动 windows。还有一个更简单的命令来完成手头的基本任务。
http://www.nirsoft.net/utils/multi_monitor_tool.html
/SetPrimary <Monitor>
Set the primary monitor.
Example:
MultiMonitorTool.exe /SetPrimary 2