3

Hi guys I want to use command to change the size of the text in cmd or if it's not possible make sth like updating notepad I mean I'm going to use something like this format

echo . sth sth
pause
echo .sth sth
pause

I wanna show echos with big size.tnx.

JosefZ
  • 28,460
  • 5
  • 44
  • 83
kmthrong kmthrongi
  • 145
  • 1
  • 5
  • 13
  • you can start [here](http://stackoverflow.com/a/19177044/2152082). You can also take a look to the linked and related questions listed at the right side of the page there. – Stephan Nov 24 '15 at 21:34
  • Unfortunately, the font of the command prompt window cannot be changed with native commands... – aschipfl Nov 25 '15 at 01:59
  • Actually you can change the font of the CMD window by clicking the system menu and selecting properties and going to Font tab. There are per user settings in the registry under HKCU:Console. Also you could probably use SendKeys to effect an immediate change. – Χpẘ Nov 25 '15 at 02:19
  • The hotkey for activating the cmd console's menu is Alt+Space, but I think the console has security preventing `SendKeys` from activating the menu with that key combination. `powershell "(new-object -COM wscript.shell).SendKeys('% ')"` for example doesn't work like you'd think it would. It's possible to [change the font *size* programmatically](http://stackoverflow.com/q/27120267/1683264) with a PowerShell script, but not the font *face* as far as I'm aware. – rojo Nov 25 '15 at 02:42
  • tnx guys and I found the answer of this question – kmthrong kmthrongi Nov 25 '15 at 13:06

1 Answers1

2

this method worked for me... I got this from Youtube so no I didn't find it myself, but I'm trying to spreed it. Just Copy and Paste this code at the START of you BAT file.

@echo off
setlocal enabledelayedexpansion enableextensions
set "cmd.con=HKCU\Console\%%SystemRoot%%_system32_cmd.exe /v"
set "ram=!tmp!\WRAM.tmp"
del "%tmp%\_$xy.bat">nul 2>&1
if [%1]==[ok] goto:init
Reg export HKCU\Console Backup.reg>nul
Reg delete HKCU\Console\%%SystemRoot%%_system32_cmd.exe /f>nul
for %%a in (
"FaceName /t REG_SZ /d "Terminal" /f"
"FontFamily /t REG_DWORD /d 48 /f"
"FontSize /t REG_DWORD /d 1024294 /f"
"FontWeight /t REG_DWORD /d 700 /f"
"ScreenBufferSize /t REG_DWORD /d 13107280 /f"
"CursorSize /t REG_DWORD /d 0 /f"
) do (
set "param=%%a"
set "param=!param:~1!"
set "param=%cmd.con% !param:~0,-1!"
Reg Add !param! >nul
)
start /high cmd /q /k "%~0" ok
for %%a in (
"FaceName /f"
"FontFamily /f"
"FontSize /f"
"FontWeight /f"
"CursorSize /f"
) do (
set "param=%%a"
set "param=!param:~1!"
set "param=%cmd.con% !param:~0,-1!"
Reg Delete !param! >nul
)

Now, it will make the WHOLE entire batch file with the Terminal font. Now its IMPOSSIBLE to have multiple fonts in one batch file, because batch is limited...

Thanks for reading this, hopefully this helped you!

Michael
  • 108
  • 2
  • 11