在一个批处理文件中更改屏幕分辨率和缩放比例,并启动一个 .exe 文件

Changing Screen Resolution and Scaling in one Batch file, and Launch a .exe file as well

我想将屏幕 1 的屏幕分辨率设置为预定值 1872 x 1248 然后将 缩放设置为 100% 然后从文件夹中启动一个 .exe 文件,一旦 exe 关闭,屏幕将自动恢复为 3240 x 2160 和 200% 缩放比例。

编辑 1:

Batch command to change the resolution of a computer

这个帮我设置了分辨率,效果很好:

  ChangeScreenResolution.exe /w=1872 /h=1248 /d=0

allFiles.exe

/wait allFiles.exe 
ChangeScreenResolution.exe /w=3240 /h=2160 /d=0 

但我根本找不到任何关于如何设置分辨率缩放的资源,这是缺失的一点,我相当确定可以做到,但我不知道如何。

如何做到?

谢谢

所以感谢@Compo,我想出了如何做到这一点:

https://github.com/imniko/SetDPI

https://tools.taubenkorb.at/change-screen-resolution/

这两个可以为任何感兴趣的人提供帮助:

::This bit changes Screen Resolution of Display1 to 1872 x 1248
::ChangeScreenResolution.exe [/w=1872 Horizontal Pixels] [/h=1248 Vertical Pixels] [/d=0 Means Display1]
ChangeScreenResolution.exe /w=1872 /h=1248 /d=0


::This bit changes this bit changes the scaling for Display1 to 125% 
:: SetDPI.exe [Display Number 1 - means Display1] [Scaling %]
SetDPI.exe 1 125

::This bit starts allFiles.exe and goes on to the next line ONLY AFTER IT'S CLOSED
allFiles.exe /wait 

::This bit sets resolution back to original
::ChangeScreenResolution.exe [/w=3240 Horizontal Pixels] [/h=2160 Vertical Pixels] [/d=0 Means Display1]
ChangeScreenResolution.exe /w=3240 /h=2160 /d=0 

::This bit sets scaling back to original
:: SetDPI.exe /[Display Number 1 - means Display1] /[Scaling %]
SetDPI.exe 1 200

谢谢大家,它现在很有用!