Preventing Your Startup Files from Being Bypassed

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.

This chapter describes some tips to try when working with your CONFIG.SYS and AUTOEXEC.BAT files. It also describes solutions for some problems you might encounter.

MS-DOS 6 provides the option of bypassing some or all of the commands in your CONFIG.SYS and AUTOEXEC.BAT files. To bypass specific startup commands, press the F8 key when your computer starts; to bypass all startup commands, press the F5 key. However, this feature can make some password-protection schemes ineffective. To disable this feature, add the following command anywhere in your CONFIG.SYS file:

Sample Multiconfig Startup Files

This section provides sample startup files for a system that includes multiple configurations.

For other multiple-configuration examples, or for information about defining multiple configurations, see the chapter "Configuring Your System" in the MS-DOS 6 User's Guide.

The following sample startup files are for a computer that loads either the network, Microsoft Windows, or a 3270 emulator. Configurations such as these are typical of computers used in a corporate environment.

The first part of the file contains commands to be carried out for all configurations.

The first choice command displays a prompt asking if you want to run Microsoft Anti-Virus. The default is No.

The three if commands test the value of the CONFIG variable, which MS-DOS sets to the block name of the configuration that was selected from the startup menu. The goto command at the end of each if command directs MS-DOS to carry out the commands in the AUTOEXEC.BAT section with the corresponding name.

The :network, :pc3270, and :travel sections contain commands to be carried out for those configurations. The goto common command at the end of each section directs MS-DOS to carry out the commands in the :common section.

The :common section contains commands to be carried out for each configuration. Besides commands that load the Share and Doskey programs, the :common section contains a choice command that displays a prompt asking if you want to run Microsoft Windows.

ANSI.SYS Will Reset Your Startup Menu Colors

If your CONFIG.SYS file contains multiple configurations, you can use the menucolor command to specify the color of the MS-DOS 6 startup menu. However, if your CONFIG.SYS file also loads the ANSI.SYS device driver, ANSI.SYS will reset your display to the default colors when it loads.

This occurs because ANSI.SYS is a block device for the console (CON). ANSI.SYS takes over all output to the console and manipulates the data in an ANSI (American National Standards Institute) format. ANSI.SYS resets the menu colors because it does not detect the previous state of the CON device.

If Your Computer Starts with the Default Configuration Without Displaying the Startup Menu

If your CONFIG.SYS file defines multiple configurations but your computer starts using the default configuration without displaying the MS-DOS 6 startup menu, the name of your default configuration block might contain disallowed characters such as spaces.

Each configuration block begins with a block header — a block name surrounded by square brackets. 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 ]). If the name of your default configuration block contains spaces or other disallowed characters, your computer might not display the startup menu.

If you want the items on your startup menu to contain spaces, you can use the menuitem command to define menu text that differs from the block name. For example, the following menuitem command displays the menu text "Start with the network," and is associated with the [net] configuration block:

menuitem=net,Start with the network

The following command specifies that the [net] configuration block is the default configuration:

menudefault=net

For more information about multiple configurations, see the chapter "Making More Memory Available" in the MS-DOS 6 User's Guide, or type help multiconfig at the command prompt.

If you use DoubleSpace disk compression and Windows for Workgroups and your computer stops responding when the network drivers are loaded, you need to change the order of the commands in your CONFIG.SYS file.

If the DBLSPACE.SYS driver is loaded into upper memory after the PROTMAN.DOS driver is loaded, your computer may stop responding when the Windows for Workgroups network drivers load.

To solve this problem, make sure the command that loads DBLSPACE.SYS appears in your CONFIG.SYS file before the command that loads PROTMAN.DOS. For example:

If You Receive an Error When Using Loadhigh with a Third-Party Shell

The MS-DOS 6 loadhigh command supports the switches /l and /s, which are used primarily by MemMaker. For example, the following MS-DOS 6 loadhigh command includes the /l switch:

loadhigh /l:0;1 mouse.com

Third-party command interpreters, such as 4DOS and NDOS, are designed to replace COMMAND.COM. (These command interpreters are sometimes called shells). These command interpreters must be updated in order to work correctly with these new loadhigh switches. If you use the /l or /s parameters with NDOS or 4DOS, you will receive the following error message:

Error: Unknown Command "/l:<region1>;<region2>

To work around the problem, either use COMMAND.COM for your command interpreter or remove the /l and /s parameters from your loadhigh (lh) commands.

For more information, or to obtain an update of your third-party command interpreter, contact your command interpreter vendor.