Any way of changing Windows screen resolution via command line?
I am using Microsoft's Live Mesh program to remotely access a PC running Windows 7, running on 2 screens: one with 1920x1080 and the other 1920x1200 resolution.
I am accessing them via an old laptop with 1024x1078 resolution. The result is such tiny icons/commands that it is difficult to try and change the screen resolution from 2 high-res displays to the single low res display.
It would be great if there was a command line way of doing this. Or perhaps there is way through live mesh to do it. Any ideas?
Solution 1:
Use QRes then say,
QRes.exe /x:800 /y:600
Solution 2:
The nircmd freeware tool can do this.
To change the display to 1024 x 768 with a 24 bit color depth:
nircmd.exe setdisplay 1024 768 24
nircmd also has other very numerous functions.
Solution 3:
I found a Windows Powershell script sample*, provided by Microsoft Technet, that is able to change the screen resolution.
The best way to invoke it, I found, was from a separate Powershell script, that looks like this:
## This loads the function (defined in another script)
. C:\[YOUR-PATH]\Set-ScreenResolution
## invoke with width and height
Set-ScreenResolution -Width 1680 -Height 1050
(Note I had saved the Microsoft script as Set-ScreenResolution.ps1
)
Then from the command line or Start->Run you can invoke the second Powershell script, which I named Invoke-Set-ScreenResolution.ps1
like this (the -noexit
param is good at first for debugging, but you may want to remove it later on depending on whether you want the command window to close):
powershell -noexit -ExecutionPolicy Bypass & C:\[your-path]\Invoke-Set-ScreenResolution.ps1
*Original Source (no longer available)
*Wayback Machine Source