A entrada de registro HKCU\Console
mencionada por NeveraX não é toda a história, todo arquivo .lnk usado para iniciar o cmd.exe pode ter diferentes configurações não tão fáceis de serem descobertas.
Para o HKCU \ Console I, uma vez escreveu um lote para enumerar os tamanhos de janela / buffer usados:
:: ConsoleSizes.cmd ::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off
:: Read: <https://blogs.msdn.microsoft.com/commandline/2017/06/20/understanding-windows-console-host-settings/>
setlocal
echo Window_X*Y_^|_Buffer_X*Y_^|_App-key_____________________________
for /F "tokens=1-2,*" %%A in (
'reg query hkcu\console /s^|findstr "\ ScreenBufferS WindowS"'
) do (
if "%%B" NEQ "REG_DWORD" (set "HKCUCon=%%A %%B %%C"&set "SBS="&SET "WS=")
if "%%A" EQU "ScreenBufferSize" set "SBS=%%C"
if "%%A" EQU "WindowSize" set "WS=%%C" & call :display
)
goto :eof
:display
set /A "WSW=WS&0xffff, WSH=WS>>16"
set "WSW= %WSW%"&set "WSH=%WSH% "
set /A "SBW=SBS&0xffff, SBH=SBS>>16"
set "SBW= %SBW%"&set "SBH=%SBH% "
set "HKCUCon=%HKCUCon:HKEY_CURRENT_USER=HKCU%"
echo/%WSW:~-5%*%WSH:~,5%^|%SBW:~-5%*%SBH:~,5% ^| %HKCUCon%
:: ConsoleSizes.cmd ::::::::::::::::::::::::::::::::::::::::::::::::::::
Saída de amostra em curto:
> ConsoleSizes.cmd
Window_X*Y_|_Buffer_X*Y_|_App-key_____________________________
80*25 | 80*300 | HKCU\console
130*50 | 130*9000 | HKCU\console\%SystemRoot%_system32_bash.exe
120*60 | 120*9000 | HKCU\console\%SystemRoot%_system32_cmd.exe
120*52 | 120*3000 | HKCU\console\%SystemRoot%_system32_diskpart.exe
148*60 | 148*3000 | HKCU\console\%SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe
120*50 | 120*3000 | HKCU\console\%SystemRoot%_SysWOW64_WindowsPowerShell_v1.0_powershell.exe
132*60 | 132*60 | HKCU\console\C:_Program Files_Far Manager_Far.exe
221*98 | 221*98 | HKCU\console\C:_Program Files_Far_Far.exe
132*50 | 132*50 | HKCU\console\C:_Sys_k.exe
132*62 | 132*3000 | HKCU\console\FreeCommander - DOS
EDIT Eu também verificaria a chave de egos de execução automática
Reg query "HKCU\Software\Microsoft\Command Processor" /v AutoRun
HKEY_CURRENT_USER\Software\Microsoft\Command Processor
AutoRun REG_SZ Doskey /MacroFile="C:\Users\LotPings\Aliases.txt"
E / ou use autoruns by sysinternals