Windows 3.x: Increasing System Stability

by M. L. Giggleman

“Maintenance” you can do!

Windows For Workgroups: Updated Serial.386 Driver

If you use Windows for Workgroups and a modem, read on! When using communication software, if you can make the first connection but subsequent connections fail and possibly hang the system, you need the updated SERIAL.386 driver. While not a new driver, most systems I have seen running Windows for Workgroups do not have this newer driver. It also corrects a problem where a Pentium with a 16550 UART hangs when opening the communications port.

To see which driver you are currently using, type the following from a DOS window or the command line:

DIR C:\WINDOWS\SYSTEM\SERIAL.386. If the file on your system is dated 11/01/93, get the updated SERIAL.386.

The file, Serial38.exe, contains SERIAL.386 and complete installation instructions. A copy has been uploaded to the HAL-PC BBS and is also available directly from Microsoft: http://www.microsoft.com/kb/softlib/mslfiles/wg1001.exe

Windows: Stabilize System And Reduce GPFs

Users of Windows 3.xx or Windows for Workgroups can expect to see a dramatic difference in system stability by adding the following line to SYSTEM.INI in the [386Enh] section: MaxBPs=768

MaxBPs stands for “Maximum Break Points”. A breakpoint is a 10-byte memory block used to keep track of the state of the system when Windows switches from one type of program to another.

Windows starts with a default value of 200 breakpoints with 4KB of RAM assigned to breakpoints. This value of 200 is rounded up to fill the entire 4KB for a total of 358 breakpoints. Windows uses approximately 200 breakpoints to load, so the default 4KB setting leaves about 158 breakpoints for application use.

Although that would appear to be an adequate amount, breakpoints are used up rather quickly due to the fact that when ended, many tasks do not release their breakpoints. For instance, switching to and from a DOS session, launching a Windows application t hat accesses a real-mode driver, screen savers that utilize timers (such as AfterDark), and checking on the state of the swap file (via Control Panel) all consume breakpoints.

The only way to regain consumed breakpoints is to exit Windows. This is one reason why regular (daily) shut-downs from Windows are very important. Otherwise, vital system resources are depleted until system stability is compromised.

The default error message when breakpoints are exceeded is a General Protection Fault. Out-of-memory errors, Application Errors, system lockups and crashes are also symptomatic of a low breakpoint situation.

The above value of 768 doubles the RAM assignment to 8KB of RAM. If more breakpoints are needed, use increments of 4KB: try values of 1177 (12KB) or 1586 (16KB).

Windows: The Temporary Directory

The temporary directory, usually named “TEMP”, is a specific directory used to store “temporary” files. It is very important to good system performance and stability.

An application usually checks the system for the location of the TEMP directory to place the temporary file. The temporary file is manipulated by the user as they work on the file, holding changes to be written with the next save. When the file is saved or the application exited, the temporary file is usually deleted by the application. Under certain conditions, however, these temporary files may remain. Besides taking up disk space, some applications have problems if there are other files in the TEMP d irectory.

Setting up a TEMP directory requires two steps. The first step is to create the directory and the second step is to tell the system where to find it. This is done by adding the appropriate lines to the AUTOEXEC.BAT file.

To create the directory from the DOS prompt: MD C:\TEMP

Add these lines to the AUTOEXEC.BAT file:

SET TEMP=C:\TEMP

SET TMP=C:\TEMP

ECHO Y | DEL C:\TEMP\*.*

The system must be rebooted for these changes to take effect.

The first two lines use the SET command to create environment variables that tell the system the location for temporary file storage. Remember, an application will look for the TEMP variable when writing a temporary file. Both variables, TEMP and TMP, de fine the location C:\TEMP. The TMP variable is necessary as some applications, particularly older ones, look for TMP rather than TEMP.

The last line does the clean-up work by deleting all files from the temporary directory. “ECHO Y |” simply generates the “y” or yes response for the delete command so that you don’t have to type it in. The “|” is the piping symbol, usually found as the s hift of one of the slash keys.

To see if you have a dedicated TEMP directory, type SET from the DOS prompt:

C:\>SET

COMSPEC=C:\COMMAND.COM

PROMPT=$p$g

PATH=C:\;C:\DOS;C:\UT;C:\WINDOWS

TEMP=C:\TEMP

TMP=C:\TEMP

windir=C:\WINDOWS

Look for lines starting with “TEMP”. Lines 4 and 5 show TEMP and TMP as the directory C:\TEMP. If you have the TEMP= lines, take a minute and verify the directory C:\TEMP actually exists. Windows can be very unstable if the TEMP variable points to a none xistent directory. To check for C:\TEMP, type: DIR C:\TEMP

If it exists, you will see a directory listing. Otherwise, you will get a “File Not Found” message; use the first step above to create the directory.

If the TEMP variable points to a directory containing other files, such as C:\DOS or C:\WINDOWS, you need to create a TEMP directory and change the lines in AUTOEXEC.BAT as shown above.

Finally, delete any temporary files wasting space on your hard drive. To find temporary files, type the following:

DIR C:\~*.TMP /S /P

This will show the file names and locations page by page. Make a note of the directories that contain temporary files. Common locations are the DOS, Windows and root directories. CAUTION: Never delete temporary files while Windows is running. That is, shut down Windows and perform the above from a DOS prompt, please!

Windows: Logical Damage

The presence of temporary files could indicate logical damage to the drive. The same conditions that leave temporary files on the drive also leave files open.

When files are written to disk, they are written in parts, like pages in a book. These “pages” may or may not be written in order, and they are generally scattered over the hard drive. The system keeps track of where the pages are located. Logical damage occurs when some “pages” become separated and are not saved with the file. Windows generates General Protection Fault messages (GPFs) when it detects logical damage on the hard drive.

The DOS SCANDISK utility can be used to detect and fix logical damage. Add this line to the end of AUTOEXEC.BAT to run SCANDISK without user intervention:

SCANDISK /AUTOFIX /NOSAVE /NOSUMMARY

Run this command directly from the DOS prompt. Do not run SCANDISK from within Windows .

Help For A Lost Window

Q. By accident, I moved the open Control Panel to the top of my screen. Now the Title Bar is completely inaccessible, which means that I cannot drag the window down or move it at all. I can expand the corner downward, but still cannot get to the menu. An y keyboard command to open the Control Panel menu results in an obnoxious beep. All that is visible is the bottom row of icons. Help me.

A. First, open the Control menu using keyboard commands: Alt-Spacebar (hold down the “Alt” key and press the Spacebar).

Then press the letter “m” and press <Enter>. This moves the window. Now use the cursor arrows — not the mouse — to move the window down, down, down, until the Title Bar is visible. Press <Enter> again when the window is positioned correctly. This procedu re will work with any errant window that wanders off the screen.

Windows: Remembering You’ve Shelled To DOS

It is easy to forget you have shelled out to DOS from Windows. To solve this problem, add the following to your AUTOEXEC.BAT: SET WINPMT=Type EXIT to return to Windows $_$P$G

The instructions (“SET WINPMT=”) define characters on the right of the equal sign as the prompt to display when shelled from Windows.

The line of text (“Type EXIT to return to Windows”) can be customized. The characters that follow (“$_$P$G) are special combinations to add to the prompt. The $_ is a line break, used so the message appears on a separate line. The $P displays current pat h information. The $G displays the > (“greater-than”) symbol associated with the DOS prompt.

Other special combinations include $V to show the DOS version, $D to display the system date, $T to display system time. Type HELP PROMPT from a DOS window or the DOS command line to learn more about setting a prompt.

Now that you have a custom prompt for Windows, you may want to eliminate the lengthy session instructions displayed each time you shell out to DOS. To remove, edit SYSTEM.INI and add the following line in the [386Enh] section: DOSPromptExitInstruc=no

Now only the Microsoft copyright message and the prompt will be displayed.

M. L. Giggleman, a HAL-PC member, is a PC Systems Specialist/WAN Administrator working contract in the Dallas and Houston areas, who may be contacted at supgigg1@airmail.net.


E-mail me at webmaster@hal-pc.org with any comments you have and tell me what you want to see here.

Back to the Magazine Home Page