This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
Displays system status, changes system settings, or reconfigures ports or devices. If used without parameters,mode displays all the controllable attributes of the console and the available COM devices.
Configures a serial communications port and sets the output handshake.
mode com<m>[:] [baud=<b>] [parity=<p>] [data=<d>] [stop=<s>] [to={on|off}] [xon={on|off}] [odsr={on|off}] [octs={on|off}] [dtr={on|off|hs}] [rts={on|off|hs|tg}] [idsr={on|off}]| Parameter | Description |
|---|---|
com<m>[:] | Specifies the number of the async Prncnfg.vbshronous communications port. |
baud=<b> | Specifies the transmission rate in bits per second. The valid values include:
|
parity=<p> | Specifies how the system uses the parity bit to check for transmission errors. The valid values include:
|
data=<d> | Specifies the number of data bits in a character. Valid values range from5 through8. The default value is7. Not all devices support the values5 and6. |
stop=<s> | Specifies the number of stop bits that define the end of a character:1,1.5, or2. If the baud rate is110, the default value is2. Otherwise, the default value is1. Not all devices support the value1.5. |
to={on | off} | Specifies whether the device uses infinite time out processing. The default value isoff. Turning this optionon means that the device will never stop waiting to receive a response from a host or client computer. |
xon={on | off} | Specifies whether the system allows the XON/XOFF protocol. This protocol provides flow control for serial communications, enhancing reliability, but reducing performance. |
odsr={on | off} | Specifies whether the system turns on the Data Set Ready (DSR) output handshake. |
octs={on | off} | Specifies whether the system turns on the Clear to Send (CTS) output handshake. |
dtr={on | off | hs} | Specifies whether the system turns on the Data Terminal Ready (DTR) output handshake. Setting this value toon mode, provides a constant signal to show the terminal is ready to send data. Setting this value tohs mode provides a handshake signal between the two terminals. |
rts={on | off | hs | tg} | Specifies whether the system turns on the Request to Send (RTS) output handshake. Setting this value toon mode, provides a constant signal to show the terminal is ready to send data. Setting this value tohs mode provides a handshake signal between the two terminals. Setting this value totg mode provides a way to toggle between ready and not ready states. |
idsr={on | off} | Specifies whether the system turns on the DSR sensitivity. You must turn this option on to use DSR handshaking. |
| /? | Displays help at the command prompt. |
Displays the status of a specified device. If used without parameters,mode displays the status of all devices installed on your system.
mode [<device>] [/status]| Parameter | Description |
|---|---|
<device> | Specifies the name of the device for which you want to display the status. Standard names include, LPT1: through LPT3:, COM1: through COM9:, and CON. |
| /status | Requests the status of any redirected parallel printers. You can also use/sta as an abbreviated version of this command. |
| /? | Displays help at the command prompt. |
Redirects printer output. You must be a member of the Administrators group to redirect printing.
Note
To set up your system so that it sends parallel printer output to a serial printer, you must use themode command twice. The first time, you must usemode to configure the serial port. The second time, you must usemode to redirect parallel printer output to the serial port you specified in the firstmode command.
mode LPT<n>[:]=COM<m>[:]| Parameter | Description |
|---|---|
LPT<n>[:] | Specifies the number of the LPT to configure. Typically, this means providing a value fromLTP1: through LTP3:, unless your system includes special parallel port support. This parameter is required. |
COM<m>[:] | Specifies the COM port to configure. Typically, this means providing a value fromCOM1: through COM9:, unless your system has special hardware for additional COM ports. This parameter is required. |
| /? | Displays help at the command prompt. |
To redirect a serial printer that operates at 4800 baud with even parity, and is connected to the COM1 port (the first serial connection on your computer), type:
mode com1 48,e,,,bmode lpt1=com1To redirect parallel printer output from LPT1 to COM1, and then to print a file using LPT1, type the following command before you print the file:
mode lpt1This command prevents the redirection the file from LPT1 to COM1.
Configures or queries the code page info for a selected device.
mode <device> codepage select=<yyy>mode <device> codepage [/status]| Parameter | Description |
|---|---|
<device> | Specifies the device for which you want to select a code page. CON is the only valid name for a device. This parameter is required. |
| codepage | Specifies which code page to use with the specified device. You can also usecp as an abbreviated version of this command. This parameter is required. |
select=<yyy> | Specifies the number of the code page to use with the device. The supported code pages, by country/region or language, include:
|
| /status | Displays the numbers of the current code pages selected for the specified device. You can also use/sta as an abbreviated version of this command. Regardless whether you specify/status, themode codepage command will display the numbers of the code pages that are selected for the specified device. |
| /? | Displays help at the command prompt. |
Changes the size of the command prompt screen buffer
mode con[:] [cols=<c>] [lines=<n>]| Parameter | Description |
|---|---|
| con[:] | Indicates that the change applies to the Command Prompt window. This parameter is required. |
cols=<c> | Specifies the number of columns in the command prompt screen buffer. The default setting is 80 columns, but you can set this to any value. If you don't use the default, typical values are 40 and 135 columns. Using non-standard values can result in the command prompt app problems. |
lines=<n> | Specifies the number of lines in the command prompt screen buffer. The default value is 25, but you can set this to any value. If you don't use the default, the other typical value is 50 lines. |
| /? | Displays help at the command prompt. |
Sets the keyboard typematic rate. The typematic rate is the speed at which Windows can repeat a character when you press the key on a keyboard.
Note
Some keyboards don't recognize this command.
mode con[:] [rate=<r> delay=<d>]| Parameter | Description |
|---|---|
| con[:] | Specifies the keyboard. This parameter is required. |
rate=<r> | Specifies the rate at which a character is repeated on the screen when you hold down a key. The default value is 20 characters per second for IBM AT-compatible keyboards, and 21 for IBM PS/2-compatible keyboards, but you can use any value from 1 through 32. If you set this parameter, you must also set thedelay parameter. |
delay=<d> | Specifies the amount of time that will elapse after you press and hold down a key before the character output repeats. The default value is 2 (.50 seconds), but you can also use 1 (.25 seconds), 3 (.75 seconds), or 4 (1 second). If you set this parameter, you must also set therate parameter. |
| /? | Displays help at the command prompt. |
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?
Was this page helpful?
Want to try using Ask Learn to clarify or guide you through this topic?