本帖最后由 bbaa 于 2018-1-9 22:10 编辑
回复 5# hlzj88 - @echo off
- @if Not "%1"=="BigFont" (Goto :BigFont)
- COLOR 0A
- for /f tokens^=1^,2^ delims^=^"^" %%a in ('wmic nicconfig get IPAddress /value ^| findstr /i "IPAddress=[^]"') do (set "ip=%%b")
- echo, 本机IP: %ip%
- pause>nul&exit
- :BigFont
- reg query "HKCU/Console/BigFont">nul 2>nul&&(
- start "BigFont" %ComSpec% /c %~f0 BigFont&exit /b
- )||(
- set ran=%random%
- more +16 %~f0>%temp%\%ran%BigFont.reg
- reg import "%temp%\%ran%BigFont.reg">nul 2>nul||(echo 注册表导入失败,请你确定允许导入注册表&pause>nul&exit)
- del /f /q "%temp%\%ran%BigFont.reg">nul 2>nul
- start "BigFont" %ComSpec% /c %~f0 BigFont&exit /b
- )
- Windows Registry Editor Version 5.00
- [HKEY_CURRENT_USER\Console\BigFont]
- "FaceName"="新宋体"
- "FontFamily"=dword:00000036
- "FontSize"=dword:00180000
- "FontWeight"=dword:00000190
- "WindowSize"=dword:00020019
复制代码 代码共23行,如测试成功,请不要忘记给我加分
注:本代码只对当前bat有效 |