使用命令提示符修改cmd.exe属性 [英] Modify cmd.exe properties using the command prompt

查看:1087
本文介绍了使用命令提示符修改cmd.exe属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这不是很好递归吗?



我在外部驱动器上有一个可移植的命令提示符,它有一个很好的.bat文件来配置一些初始设置,但我想要更多!



这是我知道如何从.bat设置:




  • Colors = (颜色XY)其中x和y是预定义颜色的十六进制数字

  • Prompt =(prompt $ p $ g)将提示设置为C:\etc\etc>默认提示

  • 标题=(标题text)将窗口标题设置为文本

  • 屏幕尺寸= XX行= YY)设置窗口的列和行大小

  • Path =(SET PATH =%〜d0 \bin;%PATH%)设置我的工具的本地路径,追加计算机的路径



这很好。但有一些设置,我似乎无法设置从蝙蝠。喜欢,我如何使用属性对话框设置这些wihtout:




  • 缓冲区=不是屏幕尺寸, b $ b
  • 快速编辑模式和自动填充等选项

  • 弹出颜色


  • 命令历史记录选项


您可以在便携式驱动器上使用字体,



当你使用 mode con: cols = XX lines = YY 命令,它不仅设置窗口(屏幕)大小,还设置缓冲区大小。



当您设置控制台窗口大小系统允许的值


执行 mode con:cols = 160 lines = 78

当Windows屏幕分辨率为1280x1024,

时,您将获得

控制台窗口大小:宽度= 160,Height = 78,

和缓冲区大小:宽度= 160,高度= 78


请参阅缓冲区大小更改为相同的值。



如果设置的值大于系统允许的值,则会看到窗口大小更改为最大值,但是


execute mode con:cols = 1600 lines = 900

当Windows屏幕分辨率为1280x1024时,

您将获得

控制台窗口大小:宽度= 160,高度= 78 ,

和缓冲区大小:宽度= 1600,高度= 900



Isn't that nicely recursive?

I've got a portable command prompt on my external drive, and it has a nice .bat file to configure some initial settings, but I'd like more!

Here's what I know how to set from .bat:

  • Colors = (color XY) where x and y are hex digits for the predefined colors
  • Prompt = (prompt $p$g) sets the prompt to "C:\etc\etc >" the default prompt
  • Title = (title "text") sets the window title to "text"
  • Screen Size = (mode con: cols=XX lines=YY) sets the columns and lines size of the window
  • Path = (SET PATH=%~d0\bin;%PATH%) sets up local path to my tools and appends the computer's path

So that's all great. But there are a few settings I can't seem to set from the bat. Like, how would I set these up wihtout using the Properties dialogue:

  • Buffer = not screen size, but the buffer
  • Options like quick edit mode and autocomplete
  • Popup colors
  • Font. And can you use a font on the portable drive, or must it be installed to work?
  • Command history options

解决方案

Regarding buffer size.

When you're using "mode con: cols=XX lines=YY" command, it sets not only window(screen) size, but the buffer size too.

In the case when you set console window size the value which is allowed by your system

execute "mode con: cols=160 lines=78",
when Windows screen resolution is 1280x1024,
you'll get
console Window Size: Width=160, Height=78,
and Buffer Size: Width=160, Height=78

you'll see that buffer size changed to the same values.

In case when values you set larger than allowed by system, you'll see that window size changed to its maximum, but buffer size has the values that you set.

execute "mode con: cols=1600 lines=900",
when Windows screen resolution is 1280x1024,
you'll get
console Window Size: Width=160, Height=78,
and Buffer Size: Width=1600, Height=900

这篇关于使用命令提示符修改cmd.exe属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆