MODE – Windows CMD Command

Configure a system device: COM / LPT port, or CMD console CON.

Mode lines will set both the height/width of the console window and the screen buffer.

The mode can be used to set the display window to be larger than the monitor width and/or height, in this case, the CMD window size will be restricted to the display size but a scroll bar will appear. If the display window is made very large (many times the size of a typical display), the memory used by conhost.exe will increase, in extreme cases to over 1 GB.

In PowerShell the height and buffer size can be set independently, but this requires a script.

Show the status of a specific device:
MODE [device]

To additionally show the status of any redirected parallel printer:
MODE [device] [/STATUS]

Keyboard

Typematic rate is the rate at which a character is repeated when you hold down a key.
MODE CON[:] [RATE=r DELAY=d]

Printing

To redirect output from a parallel port (PRN, LPT1, LPT2, or LPT3) to a serial port(COM1, COM2, COM3, etc).
You must be a member of the Administrators group to redirect printing.

To configure a parallel printer port (PRN, LPT1, LPT2, or LPT3):
MODE LPTn[:]=COMm[:]

To set up the parameters for a serial port.
MODE COMm [options*]

Configure a printer connected to a parallel printer port.
mode LPTn[:] [c][,[l][,r]]
mode LPTn[:] [cols=c] [lines=l]
This allows you to configure a line printer connected to a parallel printer port.

Window Border size

The border size (for all windows) can be set in the registry or with REG, the defaults are -15 for BorderWidth and -60 for PaddedBorderWidth

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *