Any way of changing Windows screen resolution via command line?

Use QRes then say,

QRes.exe /x:800 /y:600

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.


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