Set resolution for Batch Processing

Source: Internet
Author: User
Resolution batch processing can be set based on the machine name

If "% computername %" = "name1" setres h800 v600 B32 f85
If "% computername %" = "name2" setres h1024 v768 B32 f85
If "% computername %" = "name3" setres h1280 v960 B32 f75
Please use this program to adjust the display refresh rate parameter!
Command Format: setres hxxxx vxxxx [bxx] [FXX]
For example, setres h1024 v768 B32 f85 means 1024x768 32-bit color display update rate 85Hz
Note: The color bit and display update rate parameters can be ignored.

 

 

@ Echo off
For/F "delims =" % I in ('wmic shorttopmonitor get screenheight ^, screenwidth/value') do set "% I"> NUL 2> NUL
If not exist config. ini exit
For/F "delims =" % I in ('findstr/I "heigh = width =" config. ini ') do set "% I"> NUL 2> NUL
Echo config configuration mode % heigh % × % width %
Echo current display mode % screenheight % × % screenwidth %
Ping-N 3 127.1> NUL 2> NUL
If % screenheight % screenwidth % gtr 12801024 goto setting800600
If % screenheight % screenwidth % equ 800480 goto setting800600
Findstr/I/c: "heigh = % screenheight %" config. INI | (findstr/I/V/C: "heigh =" config. INI> config. X &> config. X echo heigh = % screenheight % & move/y config. X config. INI)
Findstr/I/c: "width = % screenwidth %" config. INI | (findstr/I/V/C: "width =" config. INI> config. X &> config. X echo width = % screenwidth % & move/y config. X config. INI)
Exit
: Setting800600
Findstr/I/V/C: "heigh =" config. INI> config. X &> config. X echo heigh = 800 & move/y config. X config. ini
Findstr/I/V/C: "width =" config. INI> config. X &> config. X echo width = 600 & move/y config. X config. ini

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.