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

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:

switches=/n
On This Page

Sample Multiconfig Startup Files
ANSI.SYS Will Reset Your Startup Menu Colors
If Your Computer Starts with the Default Configuration Without Displaying the Startup Menu
If Your Computer Stops Responding While Loading Your Windows for Workgroups Network
If You Receive an Error When Using Loadhigh with a Third-Party Shell

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.

Sample CONFIG.SYS File

The following sample CONFIG.SYS file defines three configurations:

[common]
device=c:\dos\setver.exe
device=c:\dos\himem.sys /v
device=c:\dos\dblspace.sys
[menu]
menucolor=15,1
menuitem=network,Windows for Workgroups
menuitem=pc3270,PC-3270 Support (Maximum Memory)
menuitem=travel,Travel Configuration (Saves Laptop Power)
menudefault=network,30
[network]
device=c:\windows\protman.dos /i:c:\windows
device=c:\windows\pe2ndis.exe
device=c:\windows\workgrp.sys
[pc3270]
device=c:\dos\emm386.exe ram /v
rem
rem At this point, the CONFIG.SYS file would load any 3720 emulators.
rem
[travel]
device=c:\dos\power.exe
device=c:\dos\interlnk.exe /auto
[common]
dos=high,umb
files=40
buffers=30
stacks=9,512
lastdrive=z
shell=c:\dos\command.com c:\dos\ /p
device=c:\dos\dblspace.sys /move

In this sample CONFIG.SYS file:

  • The two [common] sections contain commands to be carried out for all configurations.

  • The [menu] section defines a menu with three items. This section also includes commands that define the color of the menu and the default menu item.

  • Each of the three configuration blocks contains commands to be carried out only for that configuration. There are three configurations: [network], [pc3270], and [travel].

Sample AUTOEXEC.BAT File

The following sample AUTOEXEC.BAT file is designed to work with the sample CONFIG.SYS file in the preceding section.

@echo off
loadhigh c:\dos\smartdrv.exe
prompt $p$g
path c:\dos;c:\windows
set temp=c:\dos
cls
ver
choice /c:YN /t:N,5 "Run Microsoft Anti-Virus"
if not errorlevel 2 msav /l /p
if "%config%" == "network" goto network
if "%config%" == "pc3270 goto pc3270
if "%config%" == "travel" goto travel
:network
@echo Starting the network...
c:\windows\net start
goto common
:pc3270
@echo Loading PC-3270 Support...
rem
rem At this point, AUTOEXEC.BAT would load any 3270 emulators.
rem
goto common
:travel
@echo Loading travel software...
loadhigh power.exe
loadhigh mouse.com
goto common
:common
loadhigh c:\dos\share.exe
loadhigh c:\dos\doskey /insert
choice /c:YN /tY,5 "Run Microsoft Windows"
if not errorlevel 2 win

In this sample AUTOEXEC.BAT file:

  • 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 Your Computer Stops Responding While Loading Your Windows for Workgroups Network

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:

devicehigh=c:\dos\dblspace.sys /move
device=c:\windows\protman.dos /i:c:\windows

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.

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