Microsoft KB Archive/68128

= Troubleshooting the CONFIG.SYS and AUTOEXEC.BAT Files =

Article ID: 68128

Article Last Modified on 7/7/2005

-

APPLIES TO


 * Microsoft Windows 3.0 Standard Edition
 * Microsoft Windows 3.0a
 * Microsoft Windows 3.1 Standard Edition
 * Microsoft Windows 3.11 Standard Edition

-



This article was previously published under Q68128



3.00 3.00a 3.10 3.11

WINDOWS

kbfasttip kbtshoot





SYMPTOMS
When you run or install Microsoft Windows, you may encounter the following problems: corrupted or incomplete installation of Windows, insufficient memory or file handles, and/or an inability to use standard and enhanced modes of Windows.



CAUSE
Your CONFIG.SYS and AUTOEXEC.BAT files contain device drivers, terminate-and-stay-resident (TSR) programs, and other files.



WORKAROUND
To reduce or eliminate these problems, follow the instructions in the More Information section of this article to modify the CONFIG.SYS and AUTOEXEC.BAT files.

Use a text editor such as MS-DOS EDIT, EDLIN programs, or Windows Notepad to edit your CONFIG.SYS and AUTOEXEC.BAT files.

NOTE: Make backup copies of the the AUTOEXEC.BAT and CONFIG.SYS files, before you make your changes.



CONFIG.SYS File
Modify the CONFIG.SYS file as follows:  Remove nonessential device drivers such as keyboard buffers, scanner drivers, printer drivers, and country drivers. If you are unsure of what a device driver does, do NOT remove it. Remove FASTOPEN statements and disk caches. Verify that you have at least 60 FILES, and 20 BUFFERS. If you are using MS-DOS version 3.3 or later, add a STACKS=0,0 line to your CONFIG.SYS file. For MS-DOS version 3.2, the line should read STACKS=9,192. For more information on STACKS, query on the following words in the Microsoft Knowledge Base:

stacks and explanation and config

 If you have a SHELL=COMMAND.COM /P /E:256 statement, increase the number following the E: (the environment space) to 2048. Verify that the /p switch is used. If you do not have a SHELL command, you may want to add one, making sure that the path to COMMAND.COM in the SHELL statement matches the COMSPEC statement. At the command prompt, type

set

This command will give you the path to which the location COMSPEC is pointing.</li></ol>

AUTOEXEC.BAT File
Modify the AUTOEXEC.BAT file as follows:
 * 1) Remove any nonessential programs such as TSR programs, print buffers and APPEND, JOIN, SUBST, PRINT, and GRAPHICS statements. If you are unsure of what a program does, do NOT remove it.
 * 2) Remove all duplicate PATH entries so you only have one PATH line in your AUTOEXEC.BAT file. Modify your PATH statement so it uses the root, MS-DOS, and Windows directories only.
 * 3) Verify that you have a valid SET TEMP statement to an existing directory. For example, SET TEMP=C:\WINDOWS\TEMP.

Additional Troubleshooting Steps
<ul> Verify that the File Allocation Table is valid:

<ol> Exit Windows.</li> At the command prompt, type the following:

chkdsk /f

</li></ol>

Caution: You must Exit Windows BEFORE you type the above command. CHKDSK will also check the directory structure.</li> Verify that you are using the proper version of DOS for your computer. For example, if you are using a COMPAQ computer, you should be using a version of COMPAQ DOS.</li> Verify that the path, environment space, and TEMP directory are valid. At the command prompt, type:

set

</li></ul>

Reinstall Windows after you make the above changes to the CONFIG.SYS and AUTOEXEC.BAT files.

NOTE: Before you reinstall Windows, switch your computer off, wait a few seconds, and switch your computer on again and read the new CONFIG.SYS and AUTOEXEC.BAT files to verify your changes.

<ul>  To determine the function of certain drivers when Windows will not run, create a MS-DOS boot floppy disk containing the following CONFIG.SYS file and AUTOEXEC.BAT files and boot from the floppy disk. <pre class="fixed_text">       CONFIG.SYS:             AUTOEXEC.BAT: FILES=50               PATH=C:\WINDOWS;C:\DOS BUFFERS=20             PROMPT $P$G DEVICE=C:\HIMEM.SYS    SET TEMP=C:\WINDOWS\TEMP If, after booting, you can access the hard disk properly (CHKDSK gives the same output as before) try to run Windows.

If CHKDSK gives different output, do NOT run CHKDSK /F in this state. You may have booted without a driver necessary to access the hard drive properly. Remove the floppy and reboot from the hard drive. </li></ul>

For more information on troubleshooting similar Windows problems, query on the following word in the Microsoft Knowledge Base:

tshoot

<div class="references_section">