Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit editor mode

mode

Feedback

In this article

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.

Serial port

Configures a serial communications port and sets the output handshake.

Syntax

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}]

Parameters

ParameterDescription
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:
  • 11 - 110 baud
  • 15 - 150 baud
  • 30 - 300 baud
  • 60 - 600 baud
  • 12 - 1200 baud
  • 24 - 2400 baud
  • 48 - 4800 baud
  • 96 - 9600 baud
  • 19 - 19,200 baud
parity=<p>Specifies how the system uses the parity bit to check for transmission errors. The valid values include:
  • n - none
  • e - even (default value)
  • o - odd
  • m - mark
  • s - space
Not all devices support using them ors parameters.
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.

Device status

Displays the status of a specified device. If used without parameters,mode displays the status of all devices installed on your system.

Syntax

mode [<device>] [/status]

Parameters

ParameterDescription
<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.
/statusRequests 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.

Redirect printing

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.

Syntax

mode LPT<n>[:]=COM<m>[:]

Parameters

ParameterDescription
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.

Examples

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=com1

To 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 lpt1

This command prevents the redirection the file from LPT1 to COM1.

Select code page

Configures or queries the code page info for a selected device.

Syntax

mode <device> codepage select=<yyy>mode <device> codepage [/status]

Parameters

ParameterDescription
<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.
codepageSpecifies 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:
  • 437: United States
  • 850: Multilingual (Latin I)
  • 852: Slavic (Latin II)
  • 855: Cyrillic (Russian)
  • 857: Turkish
  • 860: Portuguese
  • 861: Icelandic
  • 863: Canadian-French
  • 865: Nordic
  • 866: Russian
  • 869: Modern Greek
This parameter is required.
/statusDisplays 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.

Display mode

Changes the size of the command prompt screen buffer

Syntax

mode con[:] [cols=<c>] [lines=<n>]

Parameters

ParameterDescription
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.

Typematic rate

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.

Syntax

mode con[:] [rate=<r> delay=<d>]

Parameters

ParameterDescription
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.

Related links


Feedback

Was this page helpful?

YesNoNo

Need help with this topic?

Want to try using Ask Learn to clarify or guide you through this topic?

Suggest a fix?

  • Last updated on

In this article

Was this page helpful?

YesNo
NoNeed help with this topic?

Want to try using Ask Learn to clarify or guide you through this topic?

Suggest a fix?