Mode
Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2
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.
To configure a serial communications port
To display the status of all devices or of a single device
To redirect output from a parallel port to a serial communications port
To select, refresh, or display the numbers of the code pages for the console
To change the size of the command prompt screen buffer
To set the keyboard typematic rate
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}]
- com M[:]
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.
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th>Value</th>
<th>Rate</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p><strong>11</strong></p></td>
<td><p>110 baud</p></td>
</tr>
<tr class="even">
<td><p><strong>15</strong></p></td>
<td><p>150 baud</p></td>
</tr>
<tr class="odd">
<td><p><strong>30</strong></p></td>
<td><p>300 baud</p></td>
</tr>
<tr class="even">
<td><p><strong>60</strong></p></td>
<td><p>600 baud</p></td>
</tr>
<tr class="odd">
<td><p><strong>12</strong></p></td>
<td><p>1200 baud</p></td>
</tr>
<tr class="even">
<td><p><strong>24</strong></p></td>
<td><p>2400 baud</p></td>
</tr>
<tr class="odd">
<td><p><strong>48</strong></p></td>
<td><p>4800 baud</p></td>
</tr>
<tr class="even">
<td><p><strong>96</strong></p></td>
<td><p>9600 baud</p></td>
</tr>
<tr class="odd">
<td><p><strong>19</strong></p></td>
<td><p>19,200 baud</p></td>
</tr>
</tbody>
</table>
- 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.
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th>Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p><strong>n</strong></p></td>
<td><p>none</p></td>
</tr>
<tr class="even">
<td><p><strong>e</strong></p></td>
<td><p>even</p></td>
</tr>
<tr class="odd">
<td><p><strong>o</strong></p></td>
<td><p>odd</p></td>
</tr>
<tr class="even">
<td><p><strong>m</strong></p></td>
<td><p>mark</p></td>
</tr>
<tr class="odd">
<td><p><strong>s</strong></p></td>
<td><p>space</p></td>
</tr>
</tbody>
</table>
- 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.
mode [Device] [/status]
- 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.
- Used without parameters, mode displays the status of all devices installed on your system.
mode lpt N[:]=comM[:]
- lpt N
Required. Specifies the parallel port. Valid values for N are in the range 1 through 3.
- Com m [:]
Required. Specifies the serial port. Valid values for M are in the range 1 through 4.
- /?
Displays help at the command prompt.
- You must be a member of the Administrators group to redirect printing.
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.
mode Device codepage select= YYY
mode Device codepage [/status]
- 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.
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th>Value</th>
<th>Country/Region</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p>437</p></td>
<td><p>United States</p></td>
</tr>
<tr class="even">
<td><p>850</p></td>
<td><p>Multilingual (Latin I)</p></td>
</tr>
<tr class="odd">
<td><p>852</p></td>
<td><p>Slavic (Latin II)</p></td>
</tr>
<tr class="even">
<td><p>855</p></td>
<td><p>Cyrillic (Russian)</p></td>
</tr>
<tr class="odd">
<td><p>857</p></td>
<td><p>Turkish</p></td>
</tr>
<tr class="even">
<td><p>860</p></td>
<td><p>Portuguese</p></td>
</tr>
<tr class="odd">
<td><p>861</p></td>
<td><p>Icelandic</p></td>
</tr>
<tr class="even">
<td><p>863</p></td>
<td><p>Canadian-French</p></td>
</tr>
<tr class="odd">
<td><p>865</p></td>
<td><p>Nordic</p></td>
</tr>
<tr class="even">
<td><p>866</p></td>
<td><p>Russian</p></td>
</tr>
<tr class="odd">
<td><p>869</p></td>
<td><p>Modern Greek</p></td>
</tr>
</tbody>
</table>
- 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.
mode con[:] [**cols=**C] [**lines=**N]
- 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.
mode con[:] [**rate=**R **delay=**D]
- 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.
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.
Format | Meaning |
---|---|
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 |
|
Code or program output |