Export (0) Print
Expand All
4 out of 5 rated this helpful - Rate this topic

Goto

Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Directs MS-DOS to a line in a batch program that is marked by a label you specify. You can use this command only in batch programs.

The goto command directs MS-DOS within a batch program to a line identified by a label. When MS-DOS finds the label, it processes the commands beginning on the next line.

On This Page

Syntax
Graphics
Help
HIMEM.SYS
If
Include
Install
Interlnk
INTERLNK.EXE
Intersvr
Keyb
Label
Lastdrive
Loadfix
Loadhigh (lh)
Mem
Memmaker
Menucolor
Menudefault
Menuitem
Mkdir (md)
Mode
Mode (Configure Printer)
Mode (Configure Serial Port)
Mode (Display Device Status)
Mode (Redirect Printing)
Mode (Set Device Code Pages)
Mode (Set Display Mode)
Mode (Set Typematic Rate)

Syntax

goto label

Parameters

label

Specifies the line in a batch program to which MS-DOS should go.

Notes

Valid values for label

The label Parameter cannot include separators such as spaces, semicolons or equal signs.

Goto uses the first eight characters of each label

The goto command uses only the first eight characters of a label. Therefore, the labels "hithere01" and "hithere02" are both equivalent to "hithere0".

Matching the label Parameter with the label in the batch program

The label value you specify on the goto command line must match a label in the batch program. The label within the batch program must be preceded by a colon.

If your batch program does not contain the label that you specify, the batch program stops and MS-DOS displays the following message:

Label not found 

MS-DOS recognizes a batch-program line beginning with a colon (:) as a label and does not process it as a command. If a line begins with a colon, MS-DOS ignores any commands on that line.

Using goto for conditional operations

Goto is often used on the same command line with other commands to perform conditional operations. For more information about using goto for conditional operations, see the if command.

Example

The following batch program formats a disk in drive A as a system disk. If the operation is successful, the goto command directs MS-DOS to a label named "end".

echo off
format a: /s
if not errorlevel 1 goto end
echo An error occurred during formatting.
:end
echo Successfully formatted the disk in drive A.

Graphics

Loads a program into memory that allows MS-DOS to print the information displayed on your screen. Use the graphics command only if you are using a color or graphics adapter.

The graphics command supports the CGA, EGA, and VGA graphics display modes.

Syntax

graphics [type] [[drive:][path]filename] [/r] [/b] [/lcd] [/printbox:std|/printbox:lcd]

Parameters

type

Specifies the type of printer. The following list shows each valid value for this Parameter and gives a brief description of its meaning:

Value

Printer

color1

An IBM Personal Computer Color Printer with black ribbon

color4

An IBM Personal Computer Color Printer with RGB (red, green, blue, and black) ribbon

color8

An IBM Personal Computer Color Printer with CMY (cyan, magenta, yellow, and black) ribbon

hpdefault

Any Hewlett-Packard PCL printer

deskjet

A Hewlett-Packard DeskJet printer

graphics

An IBM Personal Graphics Printer, IBM Proprinter, or IBM Quietwriter printer

graphicswide

An IBM Personal Graphics Printer with an 11-inch-wide carriage

laserjet

A Hewlett-Packard LaserJet printer

laserjetii

Hewlett-Packard LaserJet II printer

paintjet

Hewlett-Packard PaintJet printer

quietjet

Hewlett-Packard QuietJet printer

quietjetplus

Hewlett-Packard QuietJet Plus printer

ruggedwriter

Hewlett-Packard RuggedWriter printer

ruggedwriterwide

Hewlett-Packard RuggedWriterwide printer

thermal

IBM PC-convertible Thermal Printer

thinkjet

Hewlett-Packard ThinkJet printer

[ drive :][ path ] filename

Specifies the location and name of the printer profile that contains information about all supported printers. If this Parameter is omitted, MS-DOS looks for a file called GRAPHICS.PRO in the current directory and in the directory that contains the GRAPHICS.COM file.

Switches

/r

Prints the image as it appears on the screen (white characters on a black background) rather than reversed (black characters on a white background). The latter occurs by default.

/b

Prints the background in color. This switch is valid for color4 and color8 printers.

/lcd

Prints an image by using the liquid crystal display (LCD) aspect ratio instead of the CGA aspect ratio. The effect of this switch is the same as that of /printbox:lcd.

/printbox:std or /printbox:lcd

Selects the print-box size. Check the first operand of the printbox statement in your GRAPHICS.PRO file. If that operand is std, specify the /printbox:std switch. If that operand is lcd, specify the /printbox:lcd switch. You can abbreviate printbox as pb.

Notes

Printing the contents of the screen

To print the contents of the screen, press the SHIFT+PRINT SCREEN key combination. If the computer is in 320 x 148 x 200 color graphics mode and if the printer type is color1 or graphics, the graphics command prints the screen contents with as many as four shades of gray. If the computer is in 640 x 148 x 200 color graphics mode, graphics prints the screen contents sideways on the paper (landscape orientation). You cannot use the SHIFT+PRINT SCREEN key combination to print the contents of a screen to a PostScript printer.

Effect on memory

The graphics command decreases the amount of available conventional memory.

Loading a new profile

If you have already loaded a printer profile and you want to load another one by using the graphics command, the new profile must be smaller than the one already loaded.

To load a new profile that is larger than the one currently loaded, you must restart your system and then use the graphics command to load the new profile.

If you try to use only the graphics command to load a new profile that is larger than the currently loaded profile, MS-DOS displays the following message:

Unable to reload with profile supplied 

Example

To prepare to print a graphics screen on your printer, type the following command:

graphics 

After you display the information you want to print, press SHIFT+PRINT SCREEN. MS-DOS scans the information displayed on the screen and sends it to the printer.

Related Command

For information about printing text files, see the print command.

Help

Starts MS-DOS Help.

Syntax

help [/b] [/g] [/h] [/nohi] [topic]

Parameters

topic

Specifies the command whose help topic you want to display.

Switches

/b

Allows use of a monochrome monitor with a color graphics card.

/g

Provides the fastest update of a CGA screen.

/h

Displays the maximum number of lines possible for your hardware.

/nohi

Allows the use of a monitor without high-intensity support.

Example

To display information about the copy command, type the following at the command prompt:

help copy 

To display the MS-DOS Help table of contents, type help. From the table of contents, you can choose the command topic you want to view.

Related Command

For information about other online Help information, see the fasthelp command.

HIMEM.SYS

Himem is an extended-memory manager — a program that coordinates the use of your computer's extended memory, including the high memory area (HMA), so that no two applications or device drivers use the same memory at the same time.

You install Himem by adding a device command for HIMEM.SYS to your CONFIG.SYS file. The HIMEM.SYS command line must come before any commands that start applications or device drivers that use extended memory; for Example, the HIMEM.SYS command line must come before the EMM386.EXE command line.

Syntax

device=[drive:][path]himem.sys [/a20control:on|off] [/cpuclock:on|off] [/eisa] [/hmamin=m] [/int15=xxxx] [/numhandles=n] [/machine:xxxx] [/shadowram:on|off] [/verbose]

In most cases, you won't need to specify command-line options. The default values for HIMEM.SYS are designed to work with most hardware.

Parameters

[ drive :][ path ]

Specifies the location of the HIMEM.SYS file. HIMEM.SYS should always be located on the same drive that contains your MS-DOS files. If the HIMEM.SYS file is in the root directory of your startup drive, you don't need to include a path. However, you must always include the complete filename (HIMEM.SYS).

Switches

/a20control:on|off

Specifies whether Himem is to take control of the A20 line even if A20 was on when Himem was loaded. The A20 handler gives your computer access to the HMA. If you specify /a20control:off, Himem takes control of the A20 line only if A20 was off when Himem was loaded. The default setting is /a20control:on.

/cpuclock:on|off

Specifies whether Himem is to affect the clock speed of your computer. If your computer's clock speed changes when you install Himem, specifying /cpuclock:on may correct the problem; however, enabling this option slows down Himem. The default setting is /cpuclock:off.

/eisa

Specifies that Himem should allocate all available extended memory. This switch is necessary only on an EISA (Extended Industry Standard Architecture) computer with more than 16 MB of memory; on other computers, Himem automatically allocates all available extended memory.

/hmamin= m

Specifies how many kilobytes of memory an application must require for Himem to give that application use of the HMA. Only one application can use the HMA at a time; Himem allocates the HMA to the first application that meets the memory-use requirements set by this option. You can specify a value from 0 to 63.

Set /hmamin to the amount of memory required by the application that uses the most HMA memory.

The /hmamin option is not required; the default value is zero. Omitting this option (or setting it to zero) specifies that Himem allocate the HMA to the first application that requests it, regardless of how much of the HMA the application is going to use.

The /hmamin option has no effect when Windows is running in 386 enhanced mode.

/int15= xxxx

Allocates the amount of extended memory (in kilobytes) to be reserved for the Interrupt 15h interface. Some older applications use the Interrupt 15h interface to allocate extended memory rather than using the XMS (eXtended-Memory Specification) method provided by Himem. If you use these applications, you can ensure enough memory is available to them by setting xxxx to 64 KB larger than the amount required by the application.

You can specify a value from 64 to 65535; however, you cannot specify more memory than your system has available. If you specify a value less than 64, the value becomes 0. The default value is 0.

/numhandles= n

Specifies the maximum number of extended-memory block (EMB) handles that can be used simultaneously. You can specify a value from 1 to 128; the default value is 32. Each additional handle requires an additional 6 bytes of memory.

The /numhandles option has no effect when Windows is running in 386 enhanced mode.

/machine: xxxx

Specifies what type of computer you are using. Usually, Himem can detect your computer type successfully; however, there are a few computers that Himem cannot detect. On such systems, Himem uses the default system type (IBM AT or compatible). You might need to include the /machine option if your computer is a type that Himem cannot detect and if Himem does not work properly on your system by using the default system type.

Currently, systems that require this option include Acer 1100, Wyse, and IBM 7552.

The value for xxxx can be any of the codes or their equivalent numbers listed in the following table.

Code

Number

Computer type

at

1

IBM AT or 100% compatible

ps2

2

IBM PS/2

ptlcascade

3

Phoenix Cascade BIOS

hpvectra

4

HP Vectra (A & A+)

att6300plus

5

AT&T 6300 Plus

acer1100

6

Acer 1100

toshiba

7

Toshiba 1600 & 1200XE

wyse

8

Wyse 12.5 Mhz 286

tulip

9

Tulip SX

zenith

10

Zenith ZBIOS

at1

11

IBM PC/AT (alternative delay)

at2

12

IBM PC/AT (alternative delay)

css

12

"CSS Labs"

at3

13

IBM PC/AT (alternative delay)

philips

13

Philips

fasthp

14

HP Vectra

ibm7552

15

IBM 7552 Industrial Computer

bullmicral

16

Bull Micral 60

dell

17

Dell XBIOS

/shadowram:on|off

Specifies whether to disable shadow RAM (shadowram:off) or to leave the ROM code running from RAM (shadowram:on).

Some computers make ROM code run faster by "shadowing" it in RAM — that is, by copying the ROM code into faster RAM memory at startup, which uses some extended memory. On computers that use shadow RAM and have less than 2 MB of RAM, Himem usually attempts to disable shadow RAM to recover additional extended memory for Windows to use. (Himem can disable shadow RAM only on certain types of systems.) When Himem disables shadow RAM, the ROM code runs in the slower ROM instead of RAM; therefore, your computer might run slightly slower than it did before.

/verbose

Directs Himem to display status and error messages while loading. By default, Himem does not display any messages unless it encounters an error. You can abbreviate /verbose as /v. (To display status messages without adding the /verbose switch, press and hold the ALT key while Himem starts and loads.)

Notes

Default memory allocation

Only one program at a time can use the high memory area (HMA). If you omit the /hmamin=m switch (or set it to 0), Himem reserves the HMA for the first program that requests it and that meets the memory requirements set by the /hmamin=m switch. To ensure the most efficient use of your system's high memory area, set /hmamin=m to the amount of memory required by the program that uses the most HMA memory.

Loading MS-DOS into the high memory area

Himem or another XMS driver must be loaded in order to load MS-DOS into the high memory area (HMA). You load MS-DOS into the HMA by using the dos=high command in your CONFIG.SYS file. (The dos=high command can appear anywhere in the CONFIG.SYS file.)

Examples

To run Himem using the default values, add the following command line to your CONFIG.SYS file:

device=himem.sys 

The command line shown above does not specify a path for the HIMEM.SYS file; therefore, MS-DOS searches for the HIMEM.SYS file only in the root directory of your startup drive. Because this command line does not include additional options, Himem uses the default values for those options. Himem allocates the HMA to the first program that requests it and allows the simultaneous use of up to 32 extended-memory handles.

To specify that a maximum of 128 extended-memory handles can be used simultaneously, add the following command line to your CONFIG.SYS file:

device=c:\dos\himem.sys /numhandles=128 

If

Performs conditional processing in batch programs. If the condition specified by an if command is true, MS-DOS carries out the command that follows the condition. If the condition is false, MS-DOS ignores the command. You can use this command only in batch programs.

Syntax

if [not] errorlevelnumbercommand

if [not] string1==string2command

if [not] existfilenamecommand

Parameters

not

Specifies that MS-DOS should carry out the command only if the condition is false.

errorlevel number

Specifies a true condition only if the previous program run by COMMAND.COM returned an exit code equal to or greater than number.

command

Specifies the command that MS-DOS should carry out if the preceding condition is met.

string1 == string2

Specifies a true condition only if string1 and string2 are the same. These values can be literal strings or batch variables (%1, for Example). Literal strings do not need quotation marks.

exist filename

Specifies a true condition if filename exists.

Examples

The following Example tests for the existence of a directory. The if command cannot be used to test directly for a directory, but the null (NUL) device does exist in every directory on the hard drive. Therefore, you can test for the null device to determine whether a directory exists on the hard drive.

if exist c:\mydir\nul goto process 

The following Example displays the message "Can't find data file" if MS-DOS cannot find the file PRODUCT.DAT:

if not exist product.dat echo Can't find data file 

When a program stops, it returns an exit code to MS-DOS. For Example, a value of 0 is typically used to indicate that a program was successfully executed. The errorlevel Parameter lets you use exit codes as conditions.

The following Example displays an error message if an error occurs during formatting of the disk in drive A. If no error occurs, the error message is skipped.

:begin
echo off
format a: /s
if not errorlevel 1 goto end
echo An error occurred during formatting.
:end
echo End of batch program.

Related Command

For another Example of how the errorlevel Parameter is used, see the choice command.

Include

Includes the contents of one configuration block within another. You can use this command only in your CONFIG.SYS file.

The include command is one of five special CONFIG.SYS commands used for defining multiple configurations within a single CONFIG.SYS file. With multiple configurations, you define a menu that appears when your computer starts. Each menu item corresponds to a block of commands, or configuration block, in your CONFIG.SYS file. For more information about multiple configurations and configuration blocks, see the chapter "Configuring Your System" in the MS-DOS 6 User's Guide.

Syntax

include=blockname

Parameter

blockname

Specifies the name of the configuration block to include.

Examples

The following CONFIG.SYS file defines three configurations:

[menu]
menuitem=base_config, Base configuration only
menuitem=full_config, Normal configuration
menuitem=net_config, Normal configuration with network
[base_config]
dos=high
device=c:\\dos\\himem.sys
[full_config]
include=base_config
dos=umb
device=c:\\dos\\emm386.exe ram
devicehigh=c:\\dos\\ramdrive.sys 512
[net_config]
include=full_config
devicehigh=c:\\net\\network.sys
[common]

This CONFIG.SYS file contains four configuration blocks. The [base_config] block contains two typical CONFIG.SYS commands. The [full_config] block includes the commands in [base_config] plus the dos=umb command, a device command, and a devicehigh command. The third configuration, [net_config], includes all the commands in [full_config], which in turn includes those in [base_config]. The [common] block appears at the end of the CONFIG.SYS file. It is a good idea to end your CONFIG.SYS file with a [common] block so that installation programs can successfully append commands to your CONFIG.SYS file.

Related Commands

The include command is one of five special CONFIG.SYS commands for defining multiple configurations. The other commands are for defining the startup menu, and are as follows:

  • The menuitem command, which defines an item on the menu.

  • The menudefault command, which specifies the default menu item.

  • The menucolor command, which defines the color of the menu's text and screen background.

  • The submenu command, which defines a submenu.

In addition, the numlock command is especially useful when defining startup menus.

For an overview of the procedure for defining multiple configurations, see the topic Commands for Defining Multiple Configurations

Install

Loads a memory-resident program into memory when you start MS-DOS. You can use this command only in your CONFIG.SYS file.

Memory-resident programs stay in memory as long as your computer is on. They can be used even when other programs are active. You can use the install command to load MS-DOS memory-resident programs — for Example, Fastopen, Keyb, Nlsfunc, and Share.

Syntax

install=[drive:][path]filename [command-Parameters]

Parameters

[ drive :][ path ] filename

Specifies the location and name of the memory-resident program you want to run.

command-Parameters

Specifies Parameters for the program you specify for filename.

Notes

Install does not create an environment for a program it loads. Therefore, slightly less memory is used if you load a program with install rather than from your AUTOEXEC.BAT file. Some programs might not run correctly if they are loaded with install. Do not use install to load programs that use environment variables or shortcut keys or that require COMMAND.COM to be present to handle critical errors.

Order of CONFIG.SYS processing

All install commands are processed after any of the device commands and before the command interpreter is loaded. You cannot load a memory-resident program before a device driver loaded with the device command.

Example

Suppose you want to install FASTOPEN.EXE, located in the DOS directory on drive C, from your CONFIG.SYS file instead of from your AUTOEXEC.BAT file or the command line. In addition, you want to specify that Fastopen is to track the opening of up to 100 files and directories on drive C. To do this, include the following command in your CONFIG.SYS file:

install=c:\dos\fastopen.exe c:=100 

Interlnk

Connects two computers via parallel or serial ports and enables the computers to share disks and printer ports. For Example, you could connect a laptop computer to a desktop computer and share files. You must install the INTERLNK.EXE device driver before you can use this command.

Syntax

interlnk [client[:]=[server][:]]

To display the current status of the Interlnk program, use the following syntax:

interlnk

Parameters

client

Specifies the letter of the client drive that is redirected to a drive on the Interlnk server. The drive must be one that was redirected when you started Interlnk.

server

Specifies the letter of the drive on the Interlnk server that will be redirected. The drive must be one listed in the This Computer (Server) column of the Interlnk server screen. If no drive letter is specified, the client drive will no longer be redirected.

Notes

Installing the INTERLNK.EXE device driver

You must use the device command to install the INTERLNK.EXE device driver before you can use the interlnk command.

Canceling redirection on a drive

To cancel redirection of a client drive to a server drive, specify only the client drive and the equal sign (=).

Starting interlnk without a server

If you use interlnk to connect to a computer that is not running intersvr, interlnk will show the connection as three additional floppy disk drives. However, if you try to show the contents of these drives, they will appear empty. To show the contents of the redirected drives, the server must be running intersvr.

Assigning drive letters

When you connect two computers using interlnk, each additional drive will be assigned the next available drive letter. Because the lastdrive setting in your CONFIG.SYS file determines how many drive letters are available, make sure lastdrive is set high enough to accommodate the redirected drives.

Pin Connections for a Serial Cable

This section describes the wiring specifications for serial Interlnk cables.

Make a serial cable with either a 9-pin or a 25-pin female connector on both ends. Three wires are required for data transmission: Ground-Ground, Transmit-Receive, and Receive-Transmit. Seven wires are required if you want to use the remote copy feature. Wire the cable as follows:

9 pin           25 pin              25 pin          9 pin
=====           ======              ======          =====
pin 5           pin 7   \<------\>  pin 7           pin 5
(Ground-Ground)
pin 3           pin 2   \<------\>  pin 3           pin 2
(Transmit-Receive)
pin 7           pin 4   \<------\>  pin 5           pin 8
(RTS - CTS)
pin 6           pin 6   \<------\>  pin 20          pin 4
(DSR - DTR)
pin 2           pin 3   \<------\>  pin 2           pin 3
(Receive-Transmit)
pin 8           pin 5   \<------\>  pin 4           pin 7
(CTS - RTS)
pin 4           pin 20  \<------\>  pin 6           pin 6
(DTR - DSR)

Pin Connections for a Parallel Cable

This section describes the wiring specifications for parallel Interlnk cables.

Make a parallel cable with male DB-25 connectors at both ends. Eleven wires are required for data transmission.

25 pin            25 pin
======            ======
pin 2   \<----\>  pin 15
pin 3   \<----\>  pin 13
pin 4   \<----\>  pin 12
pin 5   \<----\>  pin 10
pin 6   \<----\>  pin 11
pin 15  \<----\>  pin 2
pin 13  \<----\>  pin 3
pin 12  \<----\>  pin 4
pin 10  \<----\>  pin 5
pin 11  \<----\>  pin 6
pin 25  \<----\>  pin 25 (Ground-Ground)

Examples

Suppose drive E exists on a server, and intersvr is running. To redirect drive G on the client to drive E on the server, type the following command:

interlnk g=e 

To cancel the redirection of client drive F, type the following command:

interlnk f= 

Related Commands

For more information about the Interlnk device driver, see INTERLNK.EXE.

For more information about Intersvr, see the intersvr command.

For more information about setting the number of available drive letters, see the lastdrive command.

INTERLNK.EXE

Redirects requests for operations on one or more Interlnk client drives or printer ports to one or more drives or printer ports on the Interlnk server. This device driver must be loaded by a device or devicehigh command in your CONFIG.SYS file.

You must install the INTERLNK.EXE device driver before you can use the interlnk and intersvr commands.

Syntax

device=[drive:][path]interlnk.exe [/drives:n] [/noprinter] [/com[:][n|address]] [/lpt[:][n|address]] [/auto] [/noscan] [/low] [/baud:rate] [/v]

Parameters

[ drive :][ path ]

Specifies the location of the INTERLNK.EXE file.

Switches

/drives: n

Specifies the number of redirected drives. By default, the number is 3. If you specify 0 as a value for n, Interlnk redirects only printers.

/noprinter

Specifies that printers not be redirected when you install INTERLNK.EXE. By default, Interlnk redirects all available printer ports.

/com[:][ n | address ]

Specifies a serial port to use for data transfer. The n Parameter specifies the number of the serial port. The address Parameter specifies the address of the serial port. If you omit n or address, the Interlnk client searches all serial ports and uses the first port that it finds connected to the server. If you specify the /com switch and omit the /lpt switch, the client searches only for serial ports. By default, Interlnk scans all serial and parallel ports.

/lpt[:][ n | address ]

Specifies a parallel port to use for data transfer. The n Parameter specifies the number of the parallel port. The address Parameter specifies the address of the parallel port. If you omit n or address, the Interlnk client uses the first parallel port that it finds connected to the server. If you specify the /lpt switch and omit the /com switch, the client searches only for parallel ports. By default, Interlnk scans all serial and parallel ports.

/auto

Installs the INTERLNK.EXE device driver in memory only if the client can establish a connection with the server when the client starts up. By default, Interlnk is installed in memory even if the client cannot establish a connection with the server.

/noscan

Installs the INTERLNK.EXE device driver in memory, but prevents establishing a connection between client and server during setup. By default, the client tries to establish a connection with the server as soon as you install INTERLNK.EXE.

/low

Loads the INTERLNK.EXE device driver into conventional memory, even if the upper memory area is available. By default, INTERLNK.EXE is loaded into the upper memory area if the upper memory area is available.

/baud: rate

Sets a maximum baud rate for serial communication. Valid values for rate are 9600, 19200, 38400, 57600, and 115200. The default is 115200.

/v

Prevents conflicts with a computer's timer. Specify this switch if you have a serial connection between computers and one of them stops running when you use Interlnk to access a drive or printer port.

Notes

Specifying the number of drives

When specifying the number of redirected drives in the /drives switch, make sure the lastdrive command in your CONFIG.SYS file is set high enough to accommodate that number of redirected drives.

Loading into the upper memory area

By default, the Interlnk device driver is loaded into the upper memory area, if MS-DOS 6 UMB support is enabled and memory is available. To load the device driver in conventional memory, use the /low switch.

Position of the Interlnk command in the CONFIG.SYS file

The position of the device command that loads INTERLNK.EXE can affect pre-existing drive assignments. For Example, suppose your computer includes a floppy disk drive (A), two hard disk drives (C and D), and two RAM drives (E and F). If you load the INTERLNK.EXE device driver before installing the RAM drives, and you choose to redirect three drives, Interlnk will assign letters E, F, and G to the redirected drives and letters H and I to the RAM drives. To prevent this from happening, load INTERLNK.EXE last in your CONFIG.SYS file.

Saving memory

By default, the Interlnk device driver loads all its code into memory. You can save memory by specifying the /noprinter, /lpt, or /com switch. If you specify the /noprinter switch, the Interlnk program does not load code that redirects printers. If you specify the /lpt switch without the /com switch, the program does not load code that supports serial ports. If you specify the /com switch without the /lpt switch, the program does not load code that supports parallel ports.

Using a serial mouse with Microsoft Windows

If you are using a serial mouse with Microsoft Windows, specify either the /lpt switch or a /com switch that designates a COM port other than the one the mouse is using. For Example, if the serial mouse uses COM1, and you are using a parallel connection, specify the /lpt switch to prevent Interlnk from scanning all COM ports.

Redirecting LPT1 or LPT2 and printing from Microsoft Windows

If you redirect LPT1 or LPT2 and print from Microsoft Windows, use Control Panel to assign the printer to either LPT1.DOS or LPT2.DOS.

Version of MS-DOS

Some features of MS-DOS may not be available to the client computer if you are running a different DOS version on your Interlnk server. For Example, if you have large partitions on your Interlnk server and are running MS-DOS 3.0 on your client, the partitions will not be available to the client because MS-DOS 3.0 does not support them.

Running an application located on the server

If you use the Interlnk program to run an application located on the server, make sure the application is configured for the computer you have designated as the Interlnk client.

Limitations on using Interlnk with other commands

The following commands do not work with the INTERLNK.EXE device driver:

chkdsk

format

defrag

mirror

diskcomp

sys

diskcopy

undelete

fdisk

unformat

Examples

Suppose your Interlnk files are located in the DOS directory on drive C, and you use the serial port to connect to another computer. To start Interlnk and specify that printers not be redirected, add the following command line to your CONFIG.SYS file:

device=c:\dos\interlnk.exe /com /noprinter 

To specify that Interlnk use a non-standard COM port whose address is 3F8, add the following line to your CONFIG.SYS file:

device=c:\dos\interlnk.exe /com:3f8 

Intersvr

Starts the Interlnk server.

Syntax

intersvr [drive:[...]] [/x=drive:[...]] [/lpt:[n|address]] [/com:[n|address]] [/baud:rate] [/b] [/v]

To copy Interlnk files from one computer to another, use the following syntax:

intersvr /rcopy

Parameters

drive :

Specifies the letter(s) of the drive(s) that will be redirected. By default, all drives are redirected.

Switches

/x= drive :

Specifies the letter(s) of drive(s) that will not be redirected. By default, all drives are redirected.

/lpt:[ n | address ]

Specifies a parallel port to use. The n Parameter specifies the number of the parallel port. The address Parameter specifies the address of the parallel port. If you omit n or address, the Interlnk server uses the first parallel port that it finds connected to the client. If you specify the /lpt switch and omit the /com switch, the server searches only for parallel ports. By default, all parallel and serial ports are scanned.

/com:[ n | address ]

Specifies a serial port to use. The n Parameter specifies the number of the serial port. The address Parameter specifies the address of the serial port. If you omit n or address, the Interlnk server searches all serial ports and uses the first port that it finds connected to the client. If you specify the /com switch and omit the /lpt switch, the server searches only for serial ports. By default, all parallel and serial ports are scanned.

/baud: rate

Sets a maximum serial baud rate. Valid values for rate are 9600, 19200, 38400, 57600, and 115200. The default value is 115200.

/b

Displays the Interlnk server screen in black and white. Use this switch if you have problems reading your monochrome monitor.

/v

Prevents conflicts with a computer's timer. Use this switch if you have a serial connection between computers and one of them stops running when you use Interlnk to access a drive or printer port.

/rcopy

Copies Interlnk files from one computer to another, provided that the computers are connected with a 7-wire, null-modem serial cable and that the mode command is available on the computer where you are installing Interlnk.

Notes

Specifying the order of drives

Interlnk redirects drives in the order you specify. The first server drive specified is redirected to the first available client drive, the second server drive specified is redirected to the second available client drive, and so forth.

Redirected devices

Interlnk does not redirect network drives, CD-ROM drives, or any other device that uses a redirection interface.

Remote copy procedure

To copy Interlnk files from one computer to another by using the /rcopy switch, you must connect the 7-wire, null-modem serial cable to the computers' serial ports.

Using a serial mouse with Microsoft Windows

If you are using a serial mouse with Microsoft Windows and you start the Interlnk server while Windows is running, you need to specify either the /lpt switch or a /com switch that designates a COM port other than the one the mouse is using. For Example, if the serial mouse uses COM1 and you are using a parallel connection, specify the /lpt switch to prevent Interlnk from scanning all COM ports.

Using Interlnk in a task-switching or multitasking environment

If you start the Interlnk server in a task-switching or multitasking environment, task switching and key combinations that switch you out of your current task are disabled. To restore these functions, quit the server.

Limitations on using intersvr with other commands

The following commands do not work with the Interlnk server:

chkdsk

format

defrag

mirror

diskcomp

sys

diskcopy

undelete

fdisk

unformat

Examples

Suppose you have two computers that each include drives A, B, and C. To start the Interlnk server and specify that server drive C be redirected to client drive D, server drive A be redirected to client drive E, and server drive B be redirected to client drive F, type the following command:

intersvr c: a: b: 

To specify that all server drives except drive A be redirected and that LPT2 be used to connect to the client, type the following command:

intersvr /x=a: /lpt2 

Related Commands

For more information about Interlnk, see interlnk and INTERLNK.EXE.

Keyb

Starts the Keyb program, which configures a keyboard for a specific language.

Use Keyb to configure a keyboard for a language other than United States English. For an introduction to the Keyb program, see the chapter "Customizing for International Use" in the MS-DOS 6 User's Guide.

Syntax

At the command prompt, use the following syntax:

keyb [xx[,[yyy][,[drive:][path]filename]]] [/e] [/id:nnn]

In your CONFIG.SYS file, use the following syntax:

install=[[dos-drive:]dos-path]keyb.com [xx[,[yyy][,[drive:][path]filename]]] [/e] [/id:nnn]

Parameters

xx

Specifies the code for a keyboard layout. See the table at the end of this topic for a list of valid values for this Parameter.

yyy

Specifies the character set (code page). See the table at the end of this topic for a list of valid values for this Parameter. If this value is not specified, keyb uses the current character set.

[ drive :][ path ] filename

Specifies the location and name of the keyboard definition file. The default filename is KEYBOARD.SYS. If KEYBOARD.SYS is in a directory included in the path, you do not have to specify these Parameters.

[ dos-drive :] dos-path

Specifies the location of the KEYB.COM file.

Switches

/e

Specifies that an enhanced keyboard is installed. Use this switch if you are using an enhanced keyboard with an 8086 computer.

/id: nnn

Specifies the keyboard in use. This switch is valid only for countries that have more than one keyboard layout for the same language (France, Italy, and the United Kingdom). See the following table for a list of valid values for nnn.

Values for xx, yyy, and nnn

The following table shows the valid values for xx, yyy, and nnn for each country/region or language:

Country/Language

xx

yyy

nnn

Belgium

be

850, 437

 

Brazil

br

850, 437

 

Canadian-French

cf

850, 863

 

Czech Republic

cz

852, 850

 

Denmark

dk

850, 865

 

Finland

su

850, 437

 

France

fr

850, 437

120, 189

Germany

gr

850, 437

 

Hungary

hu

852, 850

 

Italy

it

850, 437

141, 142

Latin America

la

850, 437

 

Netherlands

nl

850, 437

 

Norway

no

850, 865

 

Poland

pl

852, 850

 

Portugal

po

850, 860

 

Slovakia

sl

852, 850

 

Spain

sp

850, 437

 

Sweden

sv

850, 437

 

Switzerland (French)

sf

850, 437

 

Switzerland (German)

sg

850, 437

 

United Kingdom

uk

850, 437

166, 168

United States

us

850, 437

 

Notes

Installing character sets

The character set you specify for yyy must be installed on your system. If it isn't, any characters not in the current character set will not be usable.

For information about installing a character set, see the chapter "Customizing for International Use" in the MS-DOS 6 User's Guide.

Displaying the current keyboard layout and character set

If you use the keyb command with no Parameters or switches, MS-DOS lists the current keyboard layout (keyboard code), the current keyboard's related character set (code page), and the current character set (code page) used by your keyboard and monitor. The information is displayed in the following format:

Current keyboard code: FR code page: 437
Current CON code page: 437

Switching between Keyb settings

To switch from the current Keyb keyboard configuration to the default keyboard configuration, press CTRL+ALT+F1. To return to the memory-resident keyboard configuration, press CTRL+ALT+F2. To switch to "typewriter mode," the standard for some countries, press CTRL+ALT+F7.

Implementing Keyb

The following list shows the three different ways that you can start the Keyb program:

  • Type keyb at the command prompt.

  • Include an install command for KEYB.COM in your CONFIG.SYS file.

  • Include the appropriate keyb command in your AUTOEXEC.BAT file.

Keyb exit codes

The following list shows each exit code and gives a brief description of its meaning:

0

Keyboard definition file was loaded successfully.

1

Invalid keyboard code, character set, or syntax was used.

2

Keyboard definition file is bad or missing.

4

An error occurred while communicating with the keyboard or monitor.

5

The requested character set has not been prepared.

You can use the errorlevel Parameter on the if command line in a batch program to process exit codes returned by Keyb. For an Example of a batch program that processes exit codes, see the diskcomp command.

Example

To use a German keyboard if your KEYBOARD.SYS file is in the DOS directory on drive C, you would type the following command:

keyb gr,,c:\dos\keyboard.sys 

Related Command

For information about using active and prepared character sets, see the chcp command.

Label

Creates, changes, or deletes the volume label (name) of a disk.

MS-DOS displays the volume label as part of the directory listing. If a volume serial number exists, MS-DOS displays this number as well.

Syntax

label [drive:][label]

To specify that MS-DOS is to display the current volume label and serial number, if they exist, and that MS-DOS is to prompt you to enter a label or delete the existing one, use the following syntax:

label

Parameters

drive :

Specifies the location of the disk you want to name.

label

Specifies the new volume label. You must include a colon (:) between drive and label.

Notes

Label command messages

If you do not specify a label when you use the label command, MS-DOS displays a message in the following format:

Volume in drive A is xxxxxxxxxxx
Volume Serial Number is xxxx-xxxx
Volume label (11 characters, ENTER for none)?

The "Volume Serial Number" part of the message is not displayed if the disk has no serial number.

You can type the volume label you want or press ENTER to delete the current label. If a disk has a label and you press ENTER for none, MS-DOS prompts you with the following message:

Delete current volume label (Y/N)?

Press Y to delete the label; press N to keep the label.

Limitations on volume label names

A volume label can contain as many as 11 characters and can include spaces but no tabs. Consecutive spaces may be interpreted as a single space.

Do not use any of the following characters in a volume label:

* ? / \ | . , ; : + =   [ ] ( ) & ^ < > " 

MS-DOS displays volume labels in uppercase letters. If you enter a volume label in lower-case letters, the label command converts the letters to uppercase.

Using label with a redirected drive

Label does not work on a drive created with the subst command.

Example

To label a disk in drive A that contains sales information for 1991, you might type the following:

label a:sales1991 

Related Commands

For information about displaying the current disk label, see the dir or vol command.

For information about the volume serial number of a disk, see the vol command.

Lastdrive

Specifies the maximum number of drives you can access. You can use this command only in your CONFIG.SYS file.

The value you specify represents the last valid drive MS-DOS is to recognize.

Syntax

lastdrive=x

Parameter

x

Specifies a drive letter in the range A through Z.

Notes

Default setting

If you do not use the lastdrive command, the default value is the letter following the last one in use. For Example, if you are using drives A and C, the default value is D.

Effect on memory

MS-DOS allocates a data structure in memory for each drive specified by lastdrive, so you should not specify more drives than are necessary.

Example

To set the last drive to M, giving your computer access to 13 drives, you would include the following command in your CONFIG.SYS file:

lastdrive=m

Loadfix

Ensures that a program is loaded above the first 64K of conventional memory, and runs the program.

Syntax

loadfix [drive:][path]filename [program-Parameters]

Parameters

[ drive :][ path ]

Specifies the drive and directory of the program.

filename

Specifies the name of the program.

program-Parameters

Specifies any of the program's Parameters that you want to use.

Note

Some programs will display the "Packed file corrupt" message when all or a portion of the program has been loaded in the first 64K of conventional memory and cannot run successfully. This error is most likely to occur when you load device drivers into the upper memory area, thereby freeing more of the first 64K of conventional memory. If MS-DOS displays this message, use the loadfix command to ensure that a program is loaded above the first 64K of conventional memory.

To use the loadfix command, include it at the beginning of the command that starts the program.

Example

To load a program named MYAPP.EXE (in the APPS directory of drive C) and use the /c Parameter (for Example, to load the program in character mode), type the following at the command prompt or include the command in your AUTOEXEC.BAT file:

loadfix c:\apps\myapp.exe /c 

Loadhigh (lh)

Loads a program into the upper memory area. Loading a program into the upper memory area leaves more room in conventional memory for other programs. (For more information about optimizing memory, see the chapter "Making More Memory Available" in the MS-DOS 6 User's Guide.)

Syntax

loadhigh [drive:][path]filename [Parameters]

To specify the region(s) of memory into which to load the program, use the following syntax:

loadhigh [/l:region1[,minsize1][;region2[,minsize2]...] [/s]] [drive:][path]filename [Parameters]

You can abbreviate loadhigh as lh.

Parameters

[ drive :][ path ] filename

Specifies the location and name of the program you want to load.

Parameters

Specifies any command-line information required by the program.

Switches

/l: region1 [, minsize1 ][; region2 [, minsize2 ]...]

Specifies one or more regions of memory into which to load the program. If /l is not used, MS-DOS loads the program into the largest free upper-memory block (UMB) and makes all other UMBs available for the program's use. You can use the /l switch to load the program into a specific region of memory or to specify which region(s) the program can use.

To load the program into the largest block in a specific region of upper memory, specify the region number after the /l switch. For Example, to load the program into the largest free block in region 4, you would type /l:4. (To list the free areas of memory, type mem /f at the command prompt.)

When loaded with the /l switch, a program can use only the specified memory region. Some programs use more than one area of memory; for those programs, you can specify more than one region. (To find out how a particular program uses memory, use the mem /m command and specify the program name as an argument.) To specify two or more regions, separate the block numbers with a semicolon (;). For Example, to use blocks 2 and 3, you would type /l:2;3.

Normally, MS-DOS loads the program into a UMB in the specified region only if that region contains a UMB larger than the program's load size (usually equal to the size of the executable program file). If the program requires more memory while running than it does when loaded, you can use the minsize Parameter to ensure that the program will not be loaded into a UMB that is too small for it. If you specify a value for minsize, MS-DOS loads the program into that region only if it contains a UMB that is larger than both the program's load size and the minsize value.

/s

Shrinks the UMB to its minimum size while the program is loading. Using this switch makes the most efficient use of memory. This switch is typically used only by the MemMaker program, which can analyze a program's memory use to determine whether the /s switch can safely be used when loading that program. This switch can be used only in conjunction with the /l switch and affects only UMBs for which a minimum size was specified.

Notes

Dos=umb command required

To use the loadhigh command, you must include the dos=umb command in your CONFIG.SYS file. For more information about the dos=umb command, see the dos command.

Using MemMaker to optimize the upper memory area automatically

The MemMaker program, included with MS-DOS 6, automatically optimizes your system's memory. MemMaker surveys the upper memory area, analyzes the memory use of your drivers and programs, and determines which drivers and programs fit best into the available UMBs. MemMaker then adds the loadhigh command to selected lines in your AUTOEXEC.BAT file and adds /l and /s switches as necessary. For more information about using MemMaker to optimize your computer's memory, see the chapter "Making More Memory Available" in the MS-DOS 6 User's Guide.

Upper-memory-area manager must be installed

Before you can load a program into the upper memory area, you must install an upper-memory-area manager. MS-DOS provides EMM386.EXE, which manages the upper memory area for computers with an 80386 or higher processor. To install EMM386, you add a device command to your CONFIG.SYS file. (The device command for the HIMEM.SYS extended-memory manager must precede the device command for EMM386.)

How loadhigh works

When you use the loadhigh command to load a program, MS-DOS attempts to load it into the upper memory area. If there is insufficient space in the upper memory area, MS-DOS loads the program into conventional memory. To determine which UMB(s) the program is using, use the mem /m command and specify the program name as an argument.

Using loadhigh in your AUTOEXEC.BAT file

The most convenient way to use the loadhigh command is to include it in your AUTOEXEC.BAT file. (If you use the MemMaker program, it automatically adds any necessary loadhigh commands to the AUTOEXEC.BAT file.)

Examples

The following command loads the doskey program into the upper memory area and specifies that MS-DOS should load the driver into region 1:

loadhigh /l:1 c:\dos\doskey 

The following command loads the MYPROG.EXE program into region 1, and also gives it access to upper memory regions 3 and 4:

lh /l:1;3;4 c:\programs\myprog.exe 

The following command loads the MYPROG.EXE program into conventional memory (region 0) and also gives it access to upper memory region 1:

loadhigh /l:0;1 c:\programs\myprog.exe 

Related Commands

For information about loading device drivers into upper memory, see the devicehigh command.

For information about using the MemMaker program to move programs to the upper memory area, see the memmaker command.

Mem

Displays the amount of used and free memory on your computer.

You can use the mem command to display information about allocated memory areas, free memory areas, and programs that are currently loaded into memory.

Syntax

mem [/classify|/debug|/free|/modulemodulename] [/page]

To display the status of your computer's used and free memory, use the following syntax:

mem

Switches

/classify

Lists the programs that are currently loaded into memory and shows how much conventional and upper memory each program is using. Mem /classify also summarizes overall memory use and lists the largest free memory blocks. You can use the /classify switch with /page but not with other mem switches. You can abbreviate /classify as /c.

/debug

Lists the programs and internal drivers that are currently loaded into memory. Mem /debug shows each module's size, segment address, and module type, summarizes overall memory use, and displays other information useful for programming. You can use the /debug switch with /page but not with other mem switches. You can abbreviate /debug as /d.

/free

Lists the free areas of conventional and upper memory. Mem /free shows the segment address and size of each free area of conventional memory, and shows the largest free upper memory block in each region of upper memory. Mem /free also summarizes overall memory use. You can use the /free switch with /page but not with other mem switches. You can abbreviate /free as /F.

/module modulename

Shows how a program module is currently using memory. You must specify the program name after the /module switch. Mem /module lists the areas of memory the specified program module has allocated and shows the address and size of each area. You can use the /module switch with /page, but not with other mem switches. You can abbreviate /module as /m.

/page

Pauses after each screen of output. This switch can be used with any of the other mem switches.

Notes

Specifying the /page switch automatically

You can use the doskey program to automatically add the /page switch to the mem command. Then, each time you use mem, it will pause after each screenful of information even if you don't type the /p switch on the mem command line. To do this, add the following commands to your AUTOEXEC.BAT file:

c:\dos\doskey
doskey mem=mem.exe $* /p

Displaying memory status

MS-DOS displays the status of extended memory only if you have installed memory above the 1-megabyte (MB) boundary in your system. MS-DOS displays the status of expanded memory only if you use expanded memory that conforms to version 4.0 of the Lotus/Intel/Microsoft Expanded Memory Specification (LIM EMS). MS-DOS displays the status of the upper memory area only if a UMB provider such as EMM386 is installed and the command dos=umb is included in the CONFIG.SYS file. MS-DOS does not display the status of the upper memory area if you issue the mem command while you are running Windows version 3.0.

Allocating extended memory

To allocate Interrupt 15h memory and XMS memory at the same time, use the /int15 switch when you load the HIMEM.SYS device driver.

For more information, see HIMEM.SYS.

Examples

Getting general program and memory information

Suppose your system has both expanded memory and extended memory. To display a summary of your system's total memory — conventional, expanded, extended, and upper — and to display a list of programs currently loaded into memory, type the following command:

mem /classify 

The results might look similar to the following:

Modules using memory below 1 MB:
  Name           Total       =   Conventional   +   Upper Memory
  --------  ----------------   ----------------   ----------------
  MSDOS        18381   (18K)      18381   (18K)          0    (0K)
  SETVER         624    (1K)        624    (1K)          0    (0K)
  HIMEM         1104    (1K)       1104    (1K)          0    (0K)
  EMM386        4096    (4K)       4096    (4K)          0    (0K)
  PROTMAN        128    (0K)        128    (0K)          0    (0K)
  UBXPS        98624   (96K)      98624   (96K)          0    (0K)
  SMARTDRV     29296   (29K)       2480    (2K)      26816   (26K)
  DBLSPACE     47184   (46K)      47184   (46K)          0    (0K)
  COMMAND       3168    (3K)       3168    (3K)          0    (0K)
  WIN386       81312   (79K)      20880   (20K)      60432   (59K)
  PROTMAN       2560    (3K)       2560    (3K)          0    (0K)
  WIN           1584    (2K)       1584    (2K)          0    (0K)
  COMMAND       3376    (3K)       3376    (3K)          0    (0K)
  MOUSE        17328   (17K)          0    (0K)      17328   (17K)
  UBNEI         6704    (7K)          0    (0K)       6704    (7K)
  WORKGRP       4400    (4K)          0    (0K)       4400    (4K)
  SHARE         6208    (6K)          0    (0K)       6208    (6K)
  DOSKEY        4144    (4K)          0    (0K)       4144    (4K)
  Free        451264  (441K)     451264  (441K)          0    (0K)
Memory Summary:
Type of Memory        Total      =       Used      +       Free
----------------  ---------------  ----------------  ---------------
Conventional       655360  (640K)    204096  (199K)   451264  (441K)
Upper              126032  (123K)    126032  (123K)        0    (0K)
Adapter RAM/ROM    267184  (261K)    267184  (261K)        0    (0K)
Extended (XMS)    4194304 (4096K)   3145728 (3072K)  1048576 (1024K)
Expanded (EMS)          0    (0K)         0    (0K)        0    (0K)
----------------  ---------------  ----------------  ---------------
Total memory      5242880 (5120K)   3743040 (3655K)  1499840 (1465K)
Total under 1 MB   781392  (763K)    330128  (322K)   451264  (441K)
  Largest executable program size         451248   (441K)
  Largest free upper memory block              0     (0K)
  MS-DOS is resident in the high memory area.

"Adapter RAM/ROM" is the memory located on add-on boards such as video adapter boards. "Largest executable program size" is the largest contiguous block of conventional memory available for a program. "Largest free upper memory block" is the largest area of upper memory available for a program. "MS-DOS is resident in the high memory area" indicates that MS-DOS is running in the first 64K of extended memory rather than in conventional memory.

Getting information about a specific program

To find out what memory a specific program module has allocated, use the mem /module command. For Example, to find out what memory the WIN386 module has allocated, you would type the following command:

mem /module win386 

If you were running WIN386, the results might look similar to the following:

WIN386 is using the following memory:
Segment  Region        Size        Type
-------  ------  ----------------  ----------
 005D2                 64    (0K)  Data
 00D02                160    (0K)  Data
 00EF7                240    (0K)  Environment
 00F07              28592   (27K)  Program
 0D7C0       1        976    (1K)  Data
 0EEBF       2       5120    (5K)  Data
                           ----------------
Total size:          35152   (33K)

Some program modules, such as WIN386, allocate more than one area of memory. The mem /module command displays all the areas of memory allocated by the specified program, and shows the segment address and size of each allocation. For upper memory blocks, mem /module also shows the region number. The Type column shows how the program is using that particular area of memory. The "total size," in this case 35152 bytes (33K), shows the total amount of memory allocated by MS-DOS for the specified program.

Related Command

For information about checking the amount of space available on a disk, see the chkdsk command.

Memmaker

Starts the MemMaker program, which optimizes your computer's memory by moving device drivers and memory-resident programs to upper memory. To use MemMaker, your computer must have an 80386 or 80486 processor and extended memory. For more information about running MemMaker, see the chapter "Making More Memory Available" in the MS-DOS 6 User's Guide.

Do not use this command when you are running Windows.

Syntax

memmaker [/b] [/batch] [/session] [/swap:drive] [/t] [/undo] [/w:n,m]

Switches

/b

Displays MemMaker in black and white. Use this option if MemMaker isn't displayed correctly on a monochrome monitor.

/batch

Runs MemMaker in batch (unattended) mode. In batch mode, MemMaker takes the default action at all prompts. If an error occurs, MemMaker restores your previous CONFIG.SYS, AUTOEXEC.BAT and (if necessary) Windows SYSTEM.INI files. After MemMaker has completed, you can review status messages by viewing the contents of the MEMMAKER.STS file. (To view this file, use a text editor such as MS-DOS Editor, or use the type command.)

/session

Used exclusively by MemMaker during the optimization process.

/swap: drive

Specifies the letter of the drive that was originally your startup disk drive. Specify the current drive letter after the colon. This switch is necessary only if the drive letter of your startup disk drive has changed since your computer started. (The drive letter sometimes changes because of disk swapping performed by some disk-compression programs.) If the drive letter of your startup drive has changed and you do not specify this switch, MemMaker will be unable to find your system startup files.

You do not need to use this switch if you are using Stacker 2.0, SuperStor, or Microsoft DoubleSpace.

/t

Disables the detection of IBM Token-Ring networks. Use this switch if your computer includes such a network and you are having problems running MemMaker.

/undo

Instructs MemMaker to undo its most recent changes. When MemMaker optimizes your system's memory, it makes changes to your CONFIG.SYS and AUTOEXEC.BAT files (and, if necessary, your Windows SYSTEM.INI file). If your system doesn't work properly after MemMaker completes, or if you are not satisfied with your new memory configuration, you can return to your previous configuration by starting MemMaker with the /undo switch.

/w: size1 , size2

Specifies how much upper-memory space to reserve for Windows translation buffers. Windows needs two areas of upper memory for its translation buffers. The size1 value specifies the size of the first region; size2 specifies the size of the second region. By default, MemMaker does not reserve upper memory for Windows; this is equivalent to specifying /w:0,0.

Examples

To run MemMaker in batch mode and to direct it not to reserve any upper memory for Windows translation buffers, use the following command:

memmaker /batch /w:0,0 

To have MemMaker restore your previous system configuration, use the following command:

memmaker /undo 

Suppose you use a disk-compression program. Your startup disk is drive C, but after the compression driver starts, drive C becomes your main compressed drive. Your startup files are now on drive D. Because of this drive-letter swapping, you would start MemMaker by using the following command:

memmaker /swap:d 

This command specifies that the current drive D was originally the startup drive and contains your CONFIG.SYS and AUTOEXEC.BAT files.

Note: You do not need to use the /swap switch if you are using Microsoft DoubleSpace disk compression or the Stacker 2.0 disk-compression program.

Related Commands

For information about loading device drivers into upper memory, see the devicehigh command.

For information about loading programs into upper memory, see the loadhigh (lh) command.

Menucolor

Sets the text and background colors for the startup menu. You can use this command only within a menu block in your CONFIG.SYS file.

The startup menu is a list of choices that appears when you start your computer. You define a startup menu by using special CONFIG.SYS commands. Each item on the menu corresponds to a set of CONFIG.SYS commands called a "configuration block." A startup menu makes it possible to start your computer with a variety of configurations. For more information about defining multiple configurations, see the chapter "Configuring Your System" in the MS-DOS 6 User's Guide.

Syntax

menucolor=x[,y]

Parameters

x

Specifies the color of the menu text. You can specify a value from 0 to 15. For a list of values and colors, see "Color Values" later in this topic.

y

Specifies the color of the screen background. You can specify a value from 0 to 15. The y value is optional; if you do not specify a value, MS-DOS displays the specified text color on a black background.

Be sure to specify different values for x and y, or the text will not be readable.

Color values

Valid values for y are from 0 to 15, as follows:

Value

Color

Value

Color

0

Black

8

Gray

1

Blue

9

Bright blue

2

Green

10

Bright green

3

Cyan

11

Bright cyan

4

Red

12

Bright red

5

Magenta

13

Bright magenta

6

Brown

14

Yellow

7

White

15

Bright white

Note: On some displays, colors 8 through 15 blink.

Example

The following menucolor command sets the menu text to bright white and the screen background to blue:

menucolor=15, 1 

Related Commands

The menucolor command is one of six special CONFIG.SYS commands for defining startup menus and multiple configurations. The other commands are as follows:

  • The include command, which includes the contents of one configuration block in another. This command cannot be included in a menu block.

  • The menuitem command, which defines an item on the menu.

  • The menudefault command, which specifies the default menu item.

  • The numlock command, which specifies the state of the NUM LOCK key when the startup menu appears. (Although numlock can be used anywhere in the CONFIG.SYS file, it is especially useful when defining a startup menu.)

  • The submenu command, which defines a submenu.

Menudefault

Specifies the default menu item on the startup menu and sets a timeout value if desired. You can use this command only within a menu block in your CONFIG.SYS file. If you do not use this command, MS-DOS sets the default to item 1.

The startup menu is a list of choices that appears when you start your computer. You define a startup menu by using special CONFIG.SYS commands. Each item on the menu corresponds to a set of CONFIG.SYS commands called a "configuration block." A startup menu makes it possible to start your computer with a variety of configurations. For more information about defining multiple configurations, see the chapter "Configuring Your System" in the MS-DOS 6 User's Guide.

Syntax

menudefault=blockname[,timeout]

Parameters

blockname

Specifies the default menu item by its associated configuration block. The block must be defined elsewhere in the CONFIG.SYS file. When MS-DOS displays the startup menu, the default menu item is highlighted and its number appears after the "Enter a choice" prompt.

timeout

Determines how many seconds MS-DOS waits before starting the computer with the default configuration. If you don't specify a timeout value, MS-DOS does not continue until the ENTER key is pressed. You can specify a timeout value from 0 to 90 seconds. A timeout of 0 forces automatic selection of the default, effectively bypassing the menu display.

Example

The following menu block defines three menu items, sets the default item to "full_config," and sets the timeout to 30 seconds:

[menu]
menuitem=base_config,Base configuration only
menuitem=full_config,Normal configuration
menuitem=network,Normal configuration with network
menudefault=full_config,30
When MS-DOS starts and reads this menu block, it displays the following menu: 
MS-DOS 6 Startup Menu
=====================
   1. Base configuration only
   2. Normal configuration
   3. Normal configuration with network
Enter a choice: 2                       Time remaining: 30

After displaying this menu, MS-DOS waits 30 seconds; if no other item is selected, MS-DOS then starts the computer using the commands in the [full_config] configuration block.

Related Commands

The menudefault command is one of six special CONFIG.SYS commands for defining startup menus and multiple configurations. The other commands are as follows:

  • The menuitem command, which defines an item on the menu.

  • The menucolor command, which defines the color of the menu's text and screen background.

  • The submenu command, which defines a submenu.

  • The numlock command, which specifies the state of the NUM LOCK key when the startup menu appears. (Although numlock can be used anywhere in the CONFIG.SYS file, it is especially useful when defining a startup menu.)

  • The include command, which includes the contents of one configuration block in another. This command cannot be included in a menu block.

Menuitem

Defines an item on the startup menu. You can use this command only within a menu block in your CONFIG.SYS file. You can have up to nine menu items per menu.

The startup menu is a list of choices that appears when you start your computer. You define a startup menu by using special CONFIG.SYS commands. Each item on the menu corresponds to a set of CONFIG.SYS commands called a "configuration block." A startup menu makes it possible to start your computer with a variety of configurations. For more information about defining multiple configurations, see the chapter "Configuring Your System" in the MS-DOS 6 User's Guide.

Syntax

menuitem=blockname[,menu_text]

Parameters

blockname

Specifies the name of the associated configuration block. The block must be defined elsewhere in the CONFIG.SYS file. If the menu item is selected from the startup menu, MS-DOS carries out the commands in the associated configuration block, as well as any commands at the beginning of the CONFIG.SYS file and any commands in configuration blocks with the [common] header.

If MS-DOS cannot find a block with the specified name, the item does not appear on the startup menu. The block name can be up to 70 characters long and can contain most printable characters. It cannot include spaces, backslashes (\), forward slashes (/), commas, semicolons (;), equal signs (=), or square brackets ([ and ]).

menu_text

Specifies the text you want MS-DOS to display for this menu item. If you don't specify any menu text, MS-DOS displays the block name as the menu item. The menu text can be up to 70 characters long and can contain any characters you want.

Notes

Defining menu blocks

A menu block is a set of menu-definition commands that begins with a block header — the name of the block enclosed in square brackets. To have a startup menu, your CONFIG.SYS file must contain a menu block that has the [menu] block header.

You can use the submenu command to define submenus. Each submenu has its own menu block, which can be named anything you want.

A menu block must contain at least one menuitem or submenu command.

Number of items on the startup menu

MS-DOS displays the menu items in the order they appear in the menu block and numbers them automatically. The first menu item is always number 1 on the menu; there can be up to nine items. If you need to define more than nine menu items, use the submenu command.

Examples

The following [menu] block defines a startup menu with two items, Apples and Oranges:

[menu]
menuitem=Apples
menuitem=Oranges

When MS-DOS starts, the menu will appear as follows:

MS-DOS 6 Startup Menu
=====================
   1. Apples
   2. Oranges
Enter a choice: 1
The following [menu] block defines a startup menu with three items and specifies 
menu text for each item: 
[menu]
menuitem=base_config,Base configuration only
menuitem=full_config,Normal configuration
menuitem=net_config,Normal configuration with network

In this Example, the first item corresponds to the [base_config] configuration block, the second to the [full_config] block, and the third to the [net_config] block. When MS-DOS starts, it displays the following menu:

MS-DOS 6 Startup Menu
=====================
1. Base configuration only
2. Normal configuration
3. Normal configuration with network
Enter a choice: 1

Related Commands

The menuitem command is one of six special CONFIG.SYS commands for defining startup menus and multiple configurations. The other menu-definition commands are:

  • The menudefault command, which specifies the default menu item.

  • The menucolor command, which defines the color of the menu's text and screen background.

  • The submenu command, which defines a submenu.

  • The numlock command, which specifies the state of the NUM LOCK key when the startup menu appears. (Although numlock can be used anywhere in the CONFIG.SYS file, it is especially useful when defining a startup menu.)

  • The include command, which includes the contents of one configuration block in another. This command cannot be included in a menu block.

Mkdir (md)

Creates a directory.

You can use the mkdir or md command to create a multilevel directory structure.

Syntax

mkdir [drive:]path

md [drive:]path

Parameters

drive :

Specifies the drive on which you want to create the new directory.

path

Specifies the name and location of the new directory. The maximum length of any single path from the root directory to the new directory is 63 characters, including backslashes (\).

Examples

Suppose you want to create a directory on the disk in the current drive and use the directory to store all your tax information. To create a directory named TAXES, type the following command:

mkdir \taxes 

You could also type this command with the same results:

md \taxes 

Now suppose that the TAXES directory is the current directory and that you want to create a subdirectory of TAXES named PROPERTY. To create the PROPERTY directory, type the following command:

mkdir property 

Related Commands

For information about deleting a directory, see the rmdir command. For information about changing directories, see the chdir command.

Mode

Configures system devices. The mode command performs many different tasks, such as displaying system status, changing system settings, or reconfiguring ports or devices.

Using the mode command

Because the mode command can perform many different tasks, the syntax necessary to carry out each task is different. The following is a list of tasks for which you can use the mode command.

  • Reconfiguring a printer attached to a parallel port (LPT1, LPT2, or LPT3) for printing at 80 or 132 characters per line, 6 or 8 lines per inch, or both (if the printer supports these features). For more information, see mode (configure printer).

  • Configuring the baud rate, parity, and number of data bits and stop bits of a serial port (COM1, COM2, COM3, and COM4) for use with a specific printer, modem, or other serial device. For more information, see mode (configure serial port).

  • Displaying the status of all devices or of a single device. For more information, see mode (display device status).

  • Redirecting printer output from a parallel port to a serial port so that the serial port becomes the system's default printer port. For more information, see mode (redirect printing).

  • Preparing devices for character set (code page) switching. For more information, see mode (set device code pages).

  • Selecting another display adapter or changing the configuration of the current display adapter. For more information, see mode (set display mode).

  • Setting the keyboard's typematic rate. For more information, see mode (set typematic rate).

Requirement for ANSI.SYS and DISPLAY.SYS

Mode can perform some tasks, such as setting the display mode, only if you have included a device command for the ANSI.SYS device driver in your CONFIG.SYS file. You must install DISPLAY.SYS to use mode (set device code pages) for character-set switching.

Adding mode commands to AUTOEXEC.BAT

Although you can type each form of the mode command at the command prompt, you can also use mode commands within your AUTOEXEC.BAT file to reconfigure your system automatically each time you turn on or restart your computer.

Mode (Configure Printer)

Configures a printer connected to a parallel printer port.

This version of the mode command sets the characteristics for an IBM-compatible or Epson-compatible printer connected to a parallel printer port (LPT1, LPT2, or LPT3).

Syntax

mode lpt n[:] [c][,[l][,r]]

mode lpt n[:] [cols=c] [lines=l] [retry=r]

Parameters

lpt n

Specifies the parallel port to which the device is attached. Valid values for n are in the range 1 through 3.

If you omit any of the following three Parameters, mode uses the most recent setting for the omitted Parameter. If you are using the shorter form of the syntax (without the words cols=, lines=, and retry=), the mode command "recognizes" the Parameters by their positions. Thus, if you do not specify a value for a Parameter, you must still type the comma that precedes the next Parameter.

cols= c

Specifies the number of characters (columns) per line: 80 or 132. The default value is 80. You can abbreviate this Parameter by omitting cols= and specifying a value for c.

lines= l

Specifies the vertical spacing and the number of lines per inch: 6 or 8. The default value is 6. You can abbreviate this Parameter by omitting lines= and specifying a value for l.

retry= r

Specifies the retry action to take if a time-out error occurs when mode attempts to send output to a parallel printer. This Parameter causes part of mode to remain resident in memory. The following list shows each valid value for r and a brief description of its meaning:

Value

Meaning

b

Return busy from a status check of a busy port.

e

Return an error from a status check of a busy port.

p

Continue retrying until printer accepts output.

r

Return ready from a status check of a busy port.

n

Take no retry action (default value). You can also specify none for this value.

If you are using the mode command over a network, do not use any of the r values.

You can abbreviate this Parameter by omitting retry= and specifying a value for r.

Notes

Update to mode Parameter

The retry=r setting provides the same support as the p Parameter did in previous versions of MS-DOS.

Breaking out of a time-out loop

To break out of a time-out loop, press CTRL+BREAK.

Setting parallel-printer modes

For parallel-printer modes, you can use PRN and LPT1 interchangeably.

Examples

Suppose you want to be able to print 80 characters per line and 8 lines per inch on a parallel printer that is connected to the second parallel printer port (LPT2). To do this, type the following command:

mode lpt2:80,8 

Because 80 characters per line is the default setting, you could achieve the same result by typing the following command:

mode lpt2:,8 

Suppose that, when printing a file, you want your system to keep trying to print the file until it is successful. To do this, type the following command:

mode lpt2:,8,b 

To stop your system from continually retrying to print, press CTRL+BREAK or type the mode command without specifying a value for r.

Mode (Configure Serial Port)

Configures a serial communications port.

This version of the mode command sets the Parameters for a serial port (COM1, COM2, COM3, or COM4).

Syntax

mode com m[:] [b[,p[,d[,s[,r]]]]]

mode com m[:] [baud=b] [parity=p] [data=d] [stop=s] [retry=r]

Parameters

com m

Specifies the number of the serial (COM) port. Valid values for m are in the range 1 through 4.

If you omit any of the following five Parameters, mode uses the most recent setting for the omitted Parameter. If you are using the shorter form of the syntax (without the words baud=, parity=, data=, and so on), the mode command "recognizes" the Parameters by their positions. Thus, if you do not specify a value for a Parameter, you must still type the comma that precedes the next Parameter.

baud= b

Specifies the first two digits of the transmission rate in bits per second. The following list shows each valid value for b and its related rate:

Value

Rate

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

The b value of 19 is not supported on all computers (check your hardware manual). You can abbreviate this Parameter by omitting baud= and specifying a value for b.

parity= p

Specifies how the system uses the parity bit to check for transmission errors. The p value can be one of the following: n (none), e (even), o (odd), m (mark), or s (space). The default value is e. Not all computers support the values m and s. You can abbreviate this Parameter by omitting parity= and specifying a value for p.

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. You can abbreviate this Parameter by omitting data= and specifying a value for d.

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. You can abbreviate this Parameter by omitting stop= and specifying a value for s.

retry= r

Specifies the retry action to take if a time-out error occurs when mode attempts to send output to a serial printer. This Parameter causes part of mode to remain resident in memory. The following list shows each valid value for r and a brief description of its meaning:

Value

Meaning

e

Return an error from a status check of a busy port.

b

Return busy from a status check of a busy port.

p

Continue retrying until printer accepts output.

r

Return ready from a status check of a busy port.

n

Take no retry action (default value). You can also specify none for this value.

If you are using the mode command over a network, do not use any of the r values. You can abbreviate this Parameter by simply omitting retry= and specifying a value for r.

Note

The retry=b setting provides the same support as the p Parameter did in previous versions of MS-DOS.

Mode (Display Device Status)

Displays the status of one or all of the devices installed on your system.

Syntax

mode [device] [/status]

To display the status of all devices installed on your system, use the following syntax:

mode

Parameters

device

Specifies the name of the device for which you want to display the status.

Switch

/status

Requests the status of any redirected parallel printers. The mode command, when used without this switch, displays the status of all installed devices except redirected parallel printers. You can abbreviate the /status switch as /sta.

Example

To display the status of the monitor and keyboard, type the following command:

mode con /status 

Mode (Redirect Printing)

Redirects output from a parallel port to a serial communications port.

Syntax

mode lpt n[:]=comm[:]

Parameters

lpt n

Specifies the parallel port. Valid values for n are in the range 1 through 3.

com m

Specifies the serial port. Valid values for m are in the range 1 through 4.

Examples

Suppose you want to set up your system so that it sends parallel-printer output to a serial printer. To do this, you must use the mode command twice. The first time, you use mode to configure the serial port; the second time, you 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), you would type the following two commands:

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, use the following command before you print the file. This command prevents MS-DOS from redirecting the file from LPT1 to COM1.

mode lpt1 

Mode (Set Device Code Pages)

Prepares, selects, refreshes, or displays the numbers of the character sets (code pages) for parallel printers or the keyboard and monitor. For an introduction to using character sets, see "Customizing for International Use" in the MS-DOS 6 User's Guide.

Syntax

mode device codepage prepare=((yyy [...]) [drive:][path]filename)

mode device codepage select=yyy

mode device codepage refresh

mode device codepage [/status]

Parameters

device

Specifies the device for which you want to prepare or select a character set. Valid names for device are con, lpt1, lpt2, lpt3, and prn.

codepage prepare

Prepares character sets for the specified device. You must prepare a character set for a device before you can use the character set with that device. After you use the codepage prepare form of the mode command, use the codepage select form of mode to specify the character set you want to use. You can abbreviate codepage as cp and prepare as prep.

yyy

Specifies the number of the character set to prepare or select. The following list shows each character set that MS-DOS supports and its country/region or language:

Value

Country/Language

437

United States

850

Multilingual (Latin I)

852

Slavic (Latin II)

860

Portuguese

863

Canadian-French

865

Nordic

[ drive :][ path ] filename

Specifies the location and name of the code-page-information (.CPI) file that MS-DOS uses to prepare a character set for the specified device.

codepage select

Specifies (selects) which character set to use with the specified device. Before selecting a character set, you must use the codepage prepare form of the mode command to prepare a character set. You can abbreviate codepage as cp and select as sel.

codepage refresh

Reinstates the prepared character sets if they are lost as the result of a hardware problem or other error. You can abbreviate codepage as cp and refresh as ref.

codepage

Displays the numbers of the character sets, if any, that are prepared or selected for the specified device.

Switch

/status

Displays the numbers of the current character sets prepared or selected for the specified device. You can abbreviate this switch as /sta. Whether or not you specify the /status switch, typing the mode command with a device name and the codepage Parameter displays the numbers of the character sets that are prepared or selected for the specified device.

Note

MS-DOS includes five .CPI files, which correspond to specific devices, as follows:

File

Device

EGA.CPI

Enhanced graphics adapter (EGA) or IBM Personal System/2

4201.CPI

IBM Proprinters II and III Model 4201Proprinters II and III XL Model 4202

4208.CPI

IBM Proprinter X24E Model 4207Proprinter XL24E Model 4208

5202.CPI

IBM Quietwriter III printer

LCD.CPI

IBM PC Convertible liquid crystal display

Related Commands

For information about other character-set commands, see the nlsfunc and chcp commands.

Mode (Set Display Mode)

Selects the active display adapter and its display mode, or reconfigures the active display adapter.

Syntax

mode [display-adapter][,shift[,t]]

mode [display-adapter][,n]

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

Parameters

display-adapter

Specifies a setting category. The following list shows the value(s) associated with each setting category for display-adapter:

Value

Meaning

40 or 80

Indicates the number of characters per line.

bw40 or bw80

Specifies a color graphics adapter (CGA) with color turned off, and specifies the number of characters per line.

co40 or co80

Specifies a color monitor with color enabled, and specifies the number of characters per line.

mono

Specifies a monochrome display adapter with a constant width of 80 characters per line.

shift

Specifies whether to shift the CGA screen to the left or to the right. Valid values for shift are l (for left) and r (for right).

t

Enables you to align the screen by using a test pattern. MS-DOS prompts you to indicate whether the screen is aligned correctly.

con[:]

Refers to the monitor.

cols= c

Specifies the number of characters (columns) per line. Valid values are 40 and 80.

lines= n

Specifies the number of lines that can be displayed on the screen. Valid values for n are 25, 43, and 50. Not all display adapters support all three settings. To set the number of lines, you must have installed the ANSI.SYS device driver by using a device command in your CONFIG.SYS file.

Mode (Set Typematic Rate)

Sets the keyboard typematic rate, the rate at which MS-DOS repeats a character 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.

Syntax

mode con[:] [rate=rdelay=d]

Parameters

con[:]

Refers to the keyboard.

rate= d

Specifies the rate at which a character is repeated on the screen when you hold down a key. 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.

delay= d

Specifies the amount of time that must elapse — after you press and hold down a key — before MS-DOS starts to repeat the character. 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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.