bat脚本自定义魔兽warIII运行分辨率,去黑边

  我们一般平时安装完WarIII后运行时的分辨率默认是800*600,导致有黑边的存在。所以我写了一个bat脚本来自定义WarIII的运行分辨率。需要以管理员身份运行。

下载链接:

  链接:https://pan.baidu.com/s/1v-ZWjkhkVQTaXunEJs8ThQ
  提取码:m17p

WarIII_Screen_Setting.bat脚本:

@echo off

if not "%OS%"=="Windows_NT" exit
title WarIII Screen Setting
chcp 65001>nul
cd /D %~dp0
echo WarIII Screen Setting
echo ====================================
echo Author:feiquan
echo Create:2019/2/28 10:00
echo UpdataDate:2019/2/28 13:03 
echo Version:1.0v
echo Function:
echo     WarIII Screen Auto Setting
echo           Plese Run as Administrator.
echo           Auto backup WarIII reg to current path warIII_Old.reg .
echo =====================================
pause
cls


setlocal enabledelayedExpansion
set reg_war=hkcu\Software\Blizzard Entertainment\Warcraft III\Video
reg query "%reg_war%" >nul
if not %errorlevel%==0 (
    echo Not find Warcraft III .Please intasll Warcraft III try again .... & timeout /t 5 /nobreak &exit
) else (
    echo Find Warcraft III success.
    echo.
)
echo Current War3 Screen width and height :
for /F "skip=2 usebackq tokens=3" %%i in (`reg query "%reg_war%"  /v reswidth`) do set /a w=%%i & echo W: !w!
for /F "skip=2 usebackq tokens=3" %%i in (`reg query "%reg_war%"  /v resheight`) do set /a h=%%i & echo H: !h!

echo.
set /p question=Do you wart to change WarIII Screen ? (Y/N)
if /i not "%question%"=="Y" exit
echo Start backup WarIII reg :
reg export "%reg_war%" warIII_Old.reg /y  >nul
if %errorlevel%==0 ( 
    echo WarIII_Reg backup to %cd%\warIII_Old.reg 
) else (
    echo WarIII backup defeat.
    set /p question=Do you wart to continue set WarIII Screen ? (Y/N)
    if /i not "%question%"=="Y" exit
)
:setting
echo.
echo Start set WarIII Screen :
set /p SW=Please input WarIII screen width :
set /p SH=Please input WarIII screen height :
echo.
reg add "%reg_war%" /v reswidth  /t reg_dword /d %SW%  /f >nul
if %errorlevel%==0 (
    echo Add new width success. 
) else (
    echo Add new width defeat. 
)
reg add "%reg_war%" /v resheight  /t reg_dword /d %SH%  /f >nul
if %errorlevel%==0 (
    echo Add new heigth success. 
    echo You can restat warIII.
    timeout /t 3 /nobreak
    exit
) else (
    echo Add new heigth defeat. 
    goto setting
)

 

运行结果:

然后重启warIII就可以了。

如果在运行脚本时有任何问题,请在下方留言,我会修正。

转载于:https://www.cnblogs.com/feiquan/p/10449803.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值