mode
This page is from Microsoft
Updated: January 21, 2005
Displays system status, changes system settings, or reconfigures
ports or devices. Used without parameters, mode displays all
the controllable attributes of the console and the available COM
devices. Because you can use mode to perform many different
tasks, the syntax you need to use to carry out each task is
different. Click the task that you want to perform.
Syntax
modecomM[:] [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
comM[:]
Specifies the number of the
asynchronous-communications (COM) port.
baud=B
Specifies the transmission rate in bits per second.
The following table lists valid abbreviations for
B and its related rate.ValueRate11110
baud15150 baud30300 baud60600
baud121200 baud242400 baud484800
baud969600 baud1919,200 baud
parity=P
Specifies how the system uses the parity bit to
check for transmission errors. The following table
lists valid P values. The default value is
e. Not all computers support the values m
and s.ValueDescriptionnnoneeevenooddmmarksspace
data=D
Specifies the number of data bits in a character.
Valid values for d are in the range 5 through
8. The default value is 7. Not all computers support
the values 5 and 6.
stop=S
Specifies the number of stop bits that define the
end of a character: 1, 1.5, or 2. If the baud rate
is 110, the default value is 2. Otherwise, the
default value is 1. Not all computers support the
value 1.5.
to={on | off}
Specifies whether infinite time-out processing is on
or off. The default is off.
xon={on | off}
Specifies whether the xon or xoff protocol for
data-flow control is on or off.
odsr={on | off}
Specifies whether output handshaking that uses the
Data Set Ready (DSR) circuit is on or off.
octs={on| off}
Specifies whether output handshaking that uses the
Clear To Send (CTS) circuit is on or off.
dtr={on | off | hs}
Specifies whether the Data Terminal Ready (DTR)
circuit is on or off, or set to handshake.
rts={on | off | hs |
tg}
Specifies whether the Request To Send (RTS) circuit
is set to on, off, handshake, or toggle.
idsr={on | off}
Specifies whether the DSR circuit sensitivity is on
or off.
/?
Displays help at the command prompt.
Return to Top
Syntax
mode [Device] [/status]
Parameters
Device
Specifies the name of the device for which you want
to display the status.
/status
Requests the status of any redirected parallel
printers. You can abbreviate the /status
command-line option as /sta.
/?
Displays help at the command prompt.
Remarks
- Used without parameters, mode displays the status of
all devices installed on your system.
Return to Top
Syntax
modelptN[:]=comM[:]
Parameters
lptN
Required. Specifies the parallel port. Valid values
for N are in the range 1 through 3.
Comm [:]
Required. Specifies the serial port. Valid values
for M are in the range 1 through 4.
/?
Displays help at the command prompt.
Remarks
- You must be a member of the Administrators group to redirect
printing.
Examples
To set up your system so that it sends parallel-printer output
to a serial printer, you must use the mode command twice.
The first time, use mode to configure the serial port.
The second time, use mode to redirect parallel-printer
output to the serial port you specified in the first mode
command.
For example, if your serial printer 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,,,b
mode lpt1=com1
If you redirect parallel-printer output from LPT1 to COM1 but
then decide that you want to print a file by using LPT1, type
the following command before you print the file:
mode lpt1
This command prevents the redirection the file from LPT1 to
COM1.
Return to Top
Syntax
modeDevicecodepageselect=YYY
modeDevicecodepage [/status]
Parameters
Device
Required. Specifies the device for which you want to
select a code page. CON is the only valid name for a
device.
codepage select=
Required. Specifies which code page to use with the
specified device. You can abbreviate codepage
and select as cp and sel,
respectively.
YYY
Required. Specifies the number of the code page to
select. The following table lists each code page
supported and its Country/Region or
language.ValueCountry/Region437United
States850Multilingual (Latin I)852Slavic (Latin
II)855Cyrillic
(Russian)857Turkish860Portuguese861Icelandic863Canadian-French865Nordic866Russian869Modern
Greek
codepage
Required. Displays the numbers of the code pages, if
any, that are selected for the specified device.
/status
Displays the numbers of the current code pages
selected for the specified device. You can
abbreviate /status to /sta. Whether or
not you specify /status, mode codepage
displays the numbers of the code pages that are
selected for the specified device.
/?
Displays help at the command prompt.
Return to Top
Syntax
modecon[:] [cols=C] [lines=N]
Parameters
con[:]
Required. Indicates that the change is to the
command prompt window.
cols=C
Specifies the number of characters (columns) wide in
the command prompt screen buffer.
lines=N
Specifies the number of lines deep in the command
prompt screen buffer.
/?
Displays help at the command prompt.
Return to Top
Syntax
modecon[:] [rate=R delay=D]
Parameters
con[:]
Required. Refers to the keyboard.
rate=R
Specifies the rate at which a character is repeated
on the screen when you hold down a key.
delay=D
Specifies the amount of time that must elapse, after
you press and hold down a key, before the character
output starts to repeat.
/?
Displays help at the command prompt.
Remarks
- The typematic rate is the rate at which a character repeats
when you hold down the key for that character. The typematic
rate has two components, the rate and the delay. Some keyboards
do not recognize this command.
-
Using rate=R
Valid values are in the range 1
through 32. These values are equal to approximately 2 to 30
characters per second, respectively. The default value is 20 for
IBM AT-compatible keyboards, and 21 for IBM PS/2-compatible
keyboards. If you set the rate, you must also set the delay.
-
Using delay=D
Valid values for D are
1, 2, 3, and 4 (representing 0.25, 0.50, 0.75, and 1 second,
respectively). The default value is 2. If you set the delay, you
must also set the rate.
Return to Top
Formatting legend
Italic |
Information that the user must supply |
Bold |
Elements that the user must type exactly as shown |
Ellipsis (...) |
Parameter that can be repeated several times in a
command line |
Between brackets ([]) |
Optional items |
Between braces ({}); choices separated by pipe (|).
Example: {even|odd} |
Set of choices from which the user must choose only
one |
Courier font |
Code or program output |
|
|