Command mode in Windows

Display system status, change system settings or reconfigure port and connected device.

Display system status, change system settings or reconfigure port and connected device.If used without parameters, the mode command will display all the controlable properties of the control panel and available COM devices.

You can use the mode to perform the following tasks (each task uses a separate syntax):

Command mode in Windows

  1. To configure serial communication port
  2. To display the status of all devices or of a single device
  3. To redirect the output from a parallel port to a serial communication port
  4. To select, refresh or display the code page number for the control panel
  5. To change the size of the command prompt screen buffer.
  6. To set the automatic repeat rate of the keyboard.

 

To configure serial communication port

Syntax

 mode com [:] [baud = ] [parity = 

] [data =] [stop = ] [to = {on | off}] [xon = {on | off}] [odsr = {on | off}] [dtr = {on | off | hs}] [rts = {on | off | hs | tg}] [idsr = {on | off}]

Parameters

Parameters

Describe

Com [:]

Specify the number of Prncnfg.vbshronous asynchronous communication ports.

baud =

Specifies the transmission rate in bits per second.The following table lists the valid abbreviations for B and their related ratios.

- 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 bau

parity =

Specify how the system uses parity bit pairs to check for transmission errors.The following table lists valid values ​​for P. The default value is e . Not all computers support m and s values.

- n = none (no)

- e = even (even)

- o = odd (odd)

- m = mark (tick)

- s = space (space)

data =

Specify the number of data bits in a character.Valid values ​​for d range from 5 to 8. The default value is 7. Not all computers support values ​​of 5 and 6.

stop =

Specify the number of stop bits used to determine the end of a character: 1, 1.5 or 2. If the transfer rate is 110, the default value is 2. Otherwise, the default value is 1. Not all computers support 1.5.

off}

off}

off}

off}

off}

/?

Show help at the command prompt.

To display the status of all devices or of a single device

Syntax

 mode [] [/ status] 

Parameters

Parameters

Describe

 

Specify the device name you want to display status.

/ status

Request to display the status of any redirected parallel printer.You can abbreviate the command line option / status to / sta.

/?

Show help at the command prompt.

Note

If used without parameters, the mode command will show the status of all devices installed on your system.

To redirect the output from a parallel port to a serial communication port

Syntax

 lpt mode [:] = com [:] 

Parameters

Parameters

Describe

lpt [:]

Required parameters.Specify a parallel port.Valid values ​​for N range from 1 to 3.

com [:]

Required parameters.Specify the serial port.Valid values ​​for M range from 1 to 4.

/?

Show help at the command prompt.

Note

You must have administrator rights to be able to redirect printing.

For example

To set up your system to make it possible to send the parallel printer output to a serial printer, you must use the mode command twice. For the first time, use the mode command to configure the serial port. For the second time, use the mode command to redirect the 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 an even state, and it is connected to port COM1 (first serial connection on your computer), type:

 mode com1 48, e ,,, b 

mode lpt1 = com1

If you redirect the parallel printer output from LPT1 to COM1, but then you decide that you want to print the file using LPT1, enter the following command before you proceed to printing the file:

 mode lpt1 

This command prevents redirecting files from LPT1 to COM1.

To select, refresh or display the code page number for the control panel

Syntax

 mode codepage select = 

mode codepage [/ status]

Parameters

Parameters

Describe

 

Required parameters.Specify the device you want to select the code page.CON is the only valid name for a device.

codepage select =

Required parameters.Specify which code page to use with the specified device.You can abbreviate the codepage select parameter as cp sel .

 

Required parameters.Specify the code page number to select.The following list shows each supported code page and its country and region or language.

437: United States (United States)

850: Multilingual (Latin countries I)

852: Slavic (Latin countries II)

855: Cyrillic (Russian - Russian)

857: Turkish (Turkey)

860: Portuguese (Portugal)

861: Icelandic (Iceland)

863: Canadian-French (Canada-French)

865: Nordic (Norway)

866: Russian (Russia)

869: Modern Greek (Greece)

codepage

Required parameters.Displays the number of code pages (if any) selected for the specified device.

/ status

Displays the number of current code pages selected for the specified device.You can abbreviate the parameter/ status to / sta . Whether you specify the parameter / status or not, the mode codepage will still display the number of code pages selected for the specified device.

/?

Show help at the command prompt.

To change the size of the command prompt screen buffer.

Syntax

 sub mode [:] [cols =] [lines =] 

Parameters

Parameters

Describe

child [:]

Required parameters.Indicates that changes apply to the command prompt window.

cols =

Specify the number of columns in the Prompt command screen buffer .

lines =

Specify the line number in the Prompt command screen buffer.

/?

Show help at the command prompt.

To set the automatic repeat rate of the keyboard.

Syntax

 mode child [:] [rate = delay =] 

Parameters

Parameters

Describe

child [:]

Required parameters.Refers to the keyboard.

rate =

Specify the speed of repeating a character on the screen when you hold the key.

delay =

Specifies the amount of time that will elapse after you press and hold the key before the character output is repeated.

/?

Show help at the command prompt.

Note

The speed at which to type is the speed of repeating characters when you hold the key representing that character.Typing speed has two components, speed and latency.Some types of keyboards may not recognize this command.

Use rate = R :Valid values ​​range from 1 to 32. These values ​​correspond to between 2 and 30 characters per second.The default value is 20 for keyboards compatible with IBM AT and 21 for IBM compatible PS / 2 keyboards.If you set the speed, you must also set the latency.

Usedelay = D :Valid values ​​for D are 1, 2, 3 and 4 (representing 0.25, 0.50, 0.75 and 1 second).The default value is 2. If you set the latency, you must also set the speed.

See more:

  1. Netcfg command in Windows
  2. Nbtstat command in Windows
  3. Bitsadmin create command in Windows
  4. The nlbmgr command in Windows

 

4.6 ★ | 5 Vote