I tested this with XP, and it worked... I'm assuming the value of "ScreenBufferSize"= HexValueHeight + 00 + HexValueWidth. I found no documentation on this, so this may only be consistent with XP. Try it and see.

Code:
 

break on

$previousbuffer=SetCMDBuffersizeHeight()
SetCMDBuffersizeHeight(80)
$currentbuffer=SetCMDBuffersizeHeight()
? "Buffer changed from " + $previousbuffer + " to " + $currentbuffer +"."
? "Open a new CMD Window to see changes."




function SetCMDBufferSizeHeight(optional $lines)
dim $console,$SBSValue,$SBSHeight,$SBSWidth,$index
$Console="HKCU\Console"
$SBSValue="ScreenBufferSize"
$SBS=dectohex(readvalue($Console,$SBSValue))
$index=instrrev($SBS,"00")
$SBSWidth=substr($SBS,$index+2)
$SBSHeight=substr($SBS,1,$index-1)
if $lines=""
$SetCMDBufferSizeHeight=hextodec($SBSHeight)
else
if vartype($lines)=3
$=writevalue($Console,$SBSValue,"" + hextodec(dectohex($lines) + "00" + $SBSWidth),"Reg_DWORD")
else
exit -1
endif
endif
endfunction


Function HextoDec($s)
While $s
$HextoDec=16.0*$HextoDec+Execute("Exit &"+Left($s,1))
$s=SubStr($s,2)
Loop
EndFunction