Chapter 2
TECHNICAL REFERENCE
ON IMPROVING
THE OPERATION
OF WINDOWS
(Also contained in the disk file "W2IMPROV.TXT".)





CONTENTS OF CHAPTER 2

    1.   CHAPTER INTRODUCTION                               15
    2.   MODIFYING CONFIG.SYS                               15
         2.1  Buffers and Files                             15
         2.2  Environment Space                             16
    3.   MODIFYING AUTOEXEC.BAT                             16
         3.1  SMARTDrive Disk Cache                         16
         3.2  Double Buffering                              18
         3.3  The TEMP Environment Variable                 18
         3.4  Removing Non-Functioning TSRs                 19
    4.   REMOVING UNNECESSARY HARD DISK FILES               19
         4.1  Files in the \WINDOWS Subdirectory            19
         4.2  Old Windows Swap Files                        21

 1.  CHAPTER INTRODUCTION

    This chapter provides a few tips about improving the performance
of Windows.  Tips are based on our experience with running Windows
version 3.1 with MSDOS 6.2 on a 486 DX-66 PC with more than 20 MB
of free hard disk space and 8 MB of PC memory.  You must determine
for yourself whether the suggestions presented in this chapter are
relevant to your situation.  These suggestions may not be appropriate for
all PC's.  Please refer to your Windows documentation from Microsoft
when you have questions regarding the applicability of suggestions or
need greater detail.


2.  MODIFYING CONFIG.SYS

    The following suggestions require you to modify your
CONFIG.SYS file.  It is best to make a backup copy of this file before
you modify it.  A text editor should be used to make changes in your
CONFIG.SYS file.  If you use a word processing program to modify this
file, then be sure to save the file as a DOS text file or in a non-document
format after completing your changes.  The file will not function properly
when it is saved as a word processing file.

2.1 Buffers and Files

    As a general rule, you should set BUFFERS equal to 20 or less.
Since we recommend that you use Windows SMARTDrive, then you can
set BUFFERS equal to 10.  The use of SMARTDrive is discussed later in
this chapter.

    If you plan to run non-Windows applications in DOS windows,
then it is necessary to have an adequate number of file handles.  The
number of FILES should be set to a number between 30 and 50.

2.2 Environment Space

    The SHELL command indicates the command interpreter that is
used when you switch to the MS-DOS prompt.  It also specifies
environment space.  Your SHELL command should be similar to the
following example.

    SHELL=C:\DOS\COMMAND.COM /P /E:1024

    The number at the end of this command specifies the Environment
Space.  Your environment space normally should not be smaller than
1024 bytes when running Windows.


3.  MODIFYING AUTOEXEC.BAT

    When making changes to AUTOEXEC.BAT, you need to use a text
editor.  It is best to make a backup copy of this file before you make
changes in it.  If you use a word processing program to modify this file,
then be sure to save the file as a DOS text file or in a non-document
format when you have completed your changes.  This insures that the
file will function properly.

3.1 SMARTDrive Disk Cache

    Adding the SMARTDrive Disk Cache program to your
AUTOEXEC.BAT file can speed up the operation of Windows.  The
SMARTDrive program copies information from your hard disk and keeps
it in extended memory so that it can be rapidly accessed when it is
needed.  It also can temporarily store information before it is written to
your hard disk.  The cache allows certain tasks to be completed without
the necessity of waiting for the hard disk to respond.  The sample
command line that is shown below creates a default disk cache.

    C:\DOS\SMARTDRV.EXE

    The Windows installation program normally installs SMARTDrive
in your AUTOEXEC.BAT file. If your AUTOEXEC.BAT file does not
contain this command, then you should add it.

    Please note!  Do not use SMARTDrive unless you have more than
    2 MB of memory.

    The proper use of the SMARTDrive command depends on many
variables, and there is no single best setup for SMARTDrive.  We will
discuss two variables that you can test in order to improve your
system's performance.  Additional information about SMARTDrive is
available in the Windows documentation that was supplied by Microsoft,
and in the MSDOS help system.

    To use MSDOS Help to obtain information about SMARTDrive:
    Type HELP SMARTDRIVE at a DOS prompt and press ENTER.

    To increase the performance of SMARTDrive you should specify
the size of the cache.  A sample SMARTDrive command that specifies
an initial cache size and a Windows cache size is shown below.

    C:\DOS\SMARTDRV.EXE 2048 1024

    The value "2048" is the size of the cache that is used before
Windows is loaded.  The value "1024" is the minimum size of the cache
that is used when Windows is running.  The number of bytes used for
these values is directly related to the system memory on your PC.  The
following chart suggests values for PC's with various amounts of system
memory.  Please remember, these are only suggestions, and
experimentation is probably needed.

If your PC has 4 MB of extended memory, then try these cache sizes.
    Initial Cache Size = 1024
    Windows Cache Size = 512

If your PC has 8 MB or more of extended memory, then try these cache
sizes.
    Initial Cache Size = 2048
    Windows Cache Size = 2048

    (Even though 8 MB of memory was used on our PC, we found
    that we had better performance when the Windows cache size
    was set to 1024.)

    Please note!  To be sure that SMARTDrive has written all data to
the hard disk before you turn off your PC, type the following command
at a DOS prompt.

    Type SMARTDRV /C press ENTER.

3.2 Double Buffering

    If you have a small computer system interface hard disk (SCSI),
then you may need to use the Double-buffering feature of SMARTDrive.
Double buffering provides compatibility for hard disk controllers that
cannot work with virtual memory.  Please refer to your Microsoft
documentation for information about using SMARTDrive's double
buffering feature.  Double buffering is usually only required with older
hard disks.

3.3 The TEMP Environment Variable

    Windows uses Temporary Swap Files to store data.  Be sure that
you have a SET Command in your AUTOEXEC.BAT that tells Windows
where to store these files.  A sample SET command is shown below.
Also, be sure that the subdirectory, to which it points, actually exists on
your hard disk.

    SET TEMP=C:\WINDOWS\TEMP

3.4 Removing Non-Functioning TSRs

    The AUTOEXEC.BAT file may be used to load various Terminate
and Stay Resident (TSR) programs.  Most of these DOS based programs
cannot be used in Windows, and they occupy valuable space in
conventional memory.  You should remove all TSRs that cannot be used
in Windows.  You can create a batch file that can load your DOS TSRs
at those times when you plan to work in the DOS environment.

    If you routinely use the DOS version of JAWS and it is loaded by
your AUTOEXEC.BAT, then you can manually remove JAWS from
memory with the ALT+SHIFT+F1 before loading Windows.  You should
not have the DOS Version of JAWS in memory when you load Windows,
unless you plan to use the DOS version of JAWS in a DOS application
window.  Information about running the DOS version of JAWS in a DOS
Application Window is presented in the next chapter.


4.  REMOVING UNNECESSARY HARD DISK FILES

    Windows needs free disk space on your hard drive for various
types of swap files.  If you use several large application programs, then
you could need up to 16 MB of free disk drive space to support the
operation of Windows.  If you need to remove files from your hard disk,
then you can remove application programs and documents that you do
not use.  In addition, you can consider removing the following files.

4.1 Files in the \WINDOWS Subdirectory

    Use the Windows File Manager and the Windows setup program
for Removing Unwanted Windows Files from your Windows
subdirectory.  Carefully consider whether you truly want to remove each
set of files before you delete them.  If you have any questions about
what you are doing, then you should consult the chapter on "optimizing
Windows" in your Windows documentation for detailed instruction.

Bitmap files with the .BMP filename extension.
These bitmap files are used as desktop wallpaper.  If you plan to delete
these, then use the Windows Control Panel to set wallpaper to "none",
before you delete these files.

SOL.EXE and SOL.HLP
This is the Solitaire game and its Help text.

WINMINE.EXE and WINMINE.HLP
This is the Minesweeper game and its Help text.

PBRUSH.EXE, PBRUSH.HLP, and PBRUSH.DLL
This is the Windows Paintbrush accessory, its Help text, and its
dynamic-link library.

CLOCK.EXE
This is the clock accessory.

EMM386.EXE
This is an expanded-memory emulator.  This file can be deleted in
situations where you use a different emulator or you do not plan to
reconfigure your extended memory.

WRITE.EXE and WRITE.HLP
This is the Write accessory and its Help text.  It is a word processing
program.

CALENDAR.EXE and CALENDAR.HLP
This is the calendar accessory and its Help text.

CALC.EXE and CALC.HLP
This is the calculator accessory and its Help text.

CARDFILE.EXE and CARDFILE.HLP
This is the cardfile accessory and its Help text.

TERMINAL.EXE and TERMINAL.HLP
This is the Windows terminal accessory and its Help text.  You can use
it with a modem.

RECORDER.EXE, RECORDER.HLP, and RECORDER.DLL
This is the recorder accessory, its Help text, and its dynamic-link library.
It is used to record Windows macros.

4.2 Old Windows Swap Files

    If you examine the contents of the subdirectory that Windows
uses for storing its swap files, then you may find that there are old swap
files that can be deleted.  These Old Swap Files were most likely left
when Windows unexpectedly crashed.  Windows normally deletes these
files when you exit Windows.  Deleting swap files should not be done
from within Windows, because you might delete the swap file that is
currently in use.

    Swap files are stored in the TEMP subdirectory.  To determine the
location of this subdirectory, look in your AUTOEXEC.BAT file for a
"SET" statement that indicates the \TEMP subdirectory.  This
subdirectory was discussed in greater detail in an earlier section of this
chapter.

    You can delete any files in the \TEMP subdirectory that start with
the characters "~WOA".  These files are application swap files that
were created in the standard mode of Windows.  You also can delete
any file named WIN386.SWP. This file is a temporary Windows swap file
created in 386 enhanced mode.  This file is usually deleted when you
quit Windows, but it can be left on the hard disk when your PC crashes.
(You should not delete "386SPART.PAR" or "SPART.PAR".)


