Reputation: 101
I want to write a command in a batch file which changes the resolution of a computer. I am using Windows XP.
I need to set the resolution as 1024*768.
Upvotes: 5
Views: 97630
Reputation: 3329
I needed more options, so I developed ChangeScreenResolution.exe to change the screen resolution in a batch file.
Examples:
Change screen resolution of all monitors to 800x600px
ChangeScreenResolution.exe /w=800 /h=600
Change screen resolution of all monitors to 800x600px with refresh rate of 60Hz and 32bit color depth
ChangeScreenResolution.exe /w=800 /h=600 /f=60 /b=32
Set resolution of display with index 1 to 800x600px
ChangeScreenResolution.exe /w=800 /h=600 /d=1
To list all available displays (and their indexes):
ChangeScreenResolution.exe /l
Upvotes: 9
Reputation: 1
I have written a script which uses the program provided by Alexander Taubenkorb in his answer to fix monitor black screen issue due to "screen resolution out of monitor range" caused by StarCraft not reverting my desktop resolution back to its original settings on exit.
Here's the .bat content - feel free to use it.
taskkill /f /IM explorer.exe
%~dp0%\Starcraft.exe
start explorer.exe
REM *change below /w=XXX & /h=XXX values that reflect your monitor's needs*
ChangeScreenResolution.exe /w=800 /h=600
REM *this is the minimum resolution of monitor - brings desktop back to life*
ChangeScreenResolution.exe /w=1024 /h=768
REM *this is the recommended & preferred resolution I like to run my monitor at*
exit
Upvotes: 0
Reputation: 665
I haven't tried MultiRes, but note that Qres will only run on 32-bit machines.
DisplayChanger II from 12noon.com also works beautifully and is free for personal use.
DisplayChanger is designed to be called via command line or batch script, and has both 32-bit and 64-bit versions. It can also generate editable config files specifically for multi-monitor (or projector) setups. You manually set the displays up how you want, "create" a config for it, then call that configuration up at any time.
Upvotes: 1
Reputation: 2896
You can use either of the following two tools.
Using MiltiRes:
multires.exe /800,600,32,75
Using QRes:
QRes.exe /x:800 /y:600
Upvotes: 5