Lesson 3: Windows 3.x

[Previous] [Next]

As mentioned at the beginning of this chapter, Windows is an operating environment that resides on top of MS-DOS. It brings with it two distinct advances. First, it is a graphical interface that frees us from remembering all those commands (we use icons or pictures instead) and second, it gives us the ability to get around some of the limitations of MS-DOS. Although more user friendly, it brings with it additional requirements for configuration.

Calling Windows 3.x an operating system is a common, but incorrect, practice. It is really an extension of MS-DOS, and needs MS-DOS to run. This is not true with Windows 98, Windows NT, or Windows 2000. They are full-fledged operating systems, not just an interface and memory management overlay. (The .x notation indicates that the remark applies to all versions of an operating system. For example Windows 9.x would apply to both Windows 95 and 98.)

As with the lesson on MS-DOS, this lesson is not intended to offer a complete course in Windows 3.x. However, some important techniques useful to the computer professional are pointed out. Gaining an understanding of Windows 3.x, and being able to use a Windows manual as a reference, is a requirement for the computer professional.

After this lesson, you will be able to:

  • Configure Windows 3.1.
  • Edit Windows initialization files.
  • Configure virtual memory.
Estimated lesson time: 40 minutes

Windows Features

Along with Windows came many new features. As a resource manager, it handles all the common or shared functions (like printing), making application programming, hardware manufacture, and computer operation easier. As long as a device or application meets the Windows standard, it is available to share its operation or data with other compliant applications or hardware.

The following table lists some of the primary features of Windows 3.1 and 3.11.

Feature Function
Customizable user environment Such features as colors, background pictures, screen savers, mouse settings, startup programs, and the Program Manager can be changed to appear and run according to the user's preferences.
Data sharing Using Dynamic Data Exchange (DDE), information can be shared from one application to another. Object linking and embedding (OLE) allows embedding of information from one application in another application's file.
Icons Windows uses small pictures called icons to represent programs or objects.
Multitasking By allocating processor time to each application, Windows allows multiple applications to run at the same time. Each application is assigned a priority with the one currently in use receiving the most processor time.
Network awareness Windows can recognize disk and print resources provided by network systems. It is compatible with Novell, NetWare, Banyan Vines, DEC Pathworks, and Unix/Linux.
Virtual memory In an MS-DOS environment, programs are limited to the amount of physical memory (RAM) available in the computer. With Windows, part of the hard drive can be used as a swap file, in place of RAM. Using a swap file is slower than RAM; however, it does expand the capability of the computer.

Minimum Requirements for Running Windows

Windows was designed to take advantage of improvements in hardware and to overcome limitations imposed by MS-DOS. Therefore, before Windows is installed on a computer, it must meet several minimum hardware requirements. Minimum means just that—Windows will run with these parameters, but performance might not be optimal. The following table lists the minimum requirements of Windows 3.1.

Feature Minimum Requirement Comment
Processor 80386 Must have enhanced mode—the faster the better!
Memory 2 MB Windows runs, but is severely curtailed with only 2 MB; 4MB makes it usable; 8 MB or more is desirable.
MS-DOS version 3.10 The higher the MS-DOS version, the more tools that are available.
Free disk space 8 MB minimum install; 10.5 full install. Needs 20 MB or more for the swap file—the less RAM the computer has, the more free disk space is needed.
Floppy disk Not required to run Windows, but necessary for installing programs and saving data. One 3.5-inch drive.
Display adapter VGA Any VGA or better.
Printer Optional—might have to install the driver software.
Mouse Optional Difficult to use without a mouse, but it can be done. Any compatible mouse will work; however, the appropriate driver software might be needed.

Installing and Configuring Windows 3.x

There might be occasions when, as an A+ technician, you are required to install or make configuration changes to a Windows 3.1 system. This section points out some of the key issues that you could encounter when working with Windows 3.x operating systems.

Windows Setup

A standard Windows 3.1 setup or installation is done by placing the Windows Disk #1 in floppy drive A and typing:


Several switches can be used with the setup command that allow special options to be chosen:

  • SETUP /A: Places Windows on a network server for installation across the network or for file sharing. Files are designated as read-only.
  • SETUP /B: Set up for a monochrome display—useful with older laptops.
  • SETUP /I: Windows will start without performing any automatic hardware detection.
  • SETUP /N: Sets up a shared copy of Windows on a workstation.
  • SETUP /P: This can be run from within Windows (winsetup /P for 3.11 version) and will rebuild the default Program Manager groups (Main, Accessories, Games).

Express setup installs the program to C:\Windows directory, selects hardware automatically, chooses U.S. English as the default language, allows selection of printer(s), and configures existing applications.

Custom setup installs the program, but allows the user to choose many options such as drive and directory, hardware, country, optional components, and to confirm changes to startup files. Windows automatically sets up icons and program groups for any application it finds.

Applications that are made specifically for Windows (such as Microsoft Office and Lotus SmartSuite) should be installed after Windows has been installed.

After Windows is installed, type Win from any directory and Windows will load. To configure Windows to automatically start when the computer boots, add WIN as the last statement in the AUTOEXEC.BAT file.

Windows Operating System Files

When loading, Windows uses the following files:

  • WIN386.EXE: Handles virtual memory and MS-DOS applications; converts extended to expanded memory if required.
  • KRNL386.EXE: Controls and allocates system resources, I/O and memory management, multitasking, and application launching.
  • USER.EXE: Controls input and output, including mouse, keyboard, sound, timer, and COM ports. Also provides the Windows user interface.
  • GDI.EXE: Manages display graphics and printing.
  • Core files: Windows loads dynamic-link libraries (DLLs) that provide the core Windows functionality. (As mentioned in Lesson 1, a DLL is a shareable library of executable code modules.)
  • System resources: Each DLL has a storage area in a 64-KB heap. If these heaps are full, you will receive "out of memory" error messages. Closing applications should relieve the problem.
  • Windows Device Drivers: As briefly mentioned, drivers are small programs that connect Windows to the hardware. This allows applications to be independent of devices. When a new piece of hardware is added to a system, this driver needs to be installed (it's usually provided on a floppy disk with the device). Information on device drivers is recorded in the SYSTEM.INI file.
  • Font Files: Windows provides three types of font files. Each font contains a complete character set for a particular typeface. Vector fonts are designed as a set of lines drawn between two points. Each character represents a mathematical model that can be scaled to virtually any size. Raster fonts are bitmap fonts made up of a set of dots. Each character or set of dots is "painted" on the screen or printer. Because each character requires separate data for each size, only limited scaling is possible. TrueType fonts are made from an "outline" of each character. When printing (on the screen or on a printer), these outlines are filled in. TrueType fonts are supported by all printers and provide WYSIWYG (What You See Is What You Get).

Windows Configuration

Proper configuration of Windows is critical for optimal performance. There are three methods for managing or changing Windows configuration: Control Panel, Windows Setup, and .INI files.

Control Panel

The primary method for changing the Windows configuration (and the one familiar to most users) is to use the Control Panel. This is a Windows application (found in the Main Program Group) that provides a visual way to make changes.

By selecting icons and using the associated dialog boxes, a user can customize the working environment. The following items can be changed from the Control Panel:

  • Screen colors
  • Other desktop options (such as screen savers and wallpaper)
  • Fonts
  • Printer
  • Keyboard
  • Mouse
  • International settings
  • COM port settings
  • Network settings
  • Date and time
  • Sounds (used by system)
  • Drivers for hardware
  • Multitasking and virtual memory settings

Windows Setup

Windows setup will operate from within Windows if it is already loaded—click the Setup icon in the Main Group. Or it will start from MS-DOS—type SETUP when in the Windows directory. Using setup should be done only by experienced computer users. The results of improper setup can be disastrous—Windows won't run. If this happens, you can use the MS-DOS version of setup. From an MS-DOS prompt, change to the Windows directory and type the command SETUP.

Windows Initialization Files

The third method for modifying Windows configuration is to edit the Windows .INI files. As with the setup method, this should be used only by experienced operators. The Windows .INI files, which are found in the Windows directory of the bootable drive, initialize (configure) everything from device drivers to applications. Windows itself creates at least three .INI files, and any application can create initialization files of its own. Knowing how and what to edit in these files is critical to repairing and optimizing the performance of a computer.

You can use any text editor to edit .INI files. (MS-DOS provides a program for editing text files called EDIT. This program can be run from the MS-DOS prompt.) All .INI files are broken up into logical areas called groups. Each group starts with a line of text, in square brackets, called a group header. Underneath each group are its settings. They are organized as item=settings.

For example, see the following PROGMAN.INI file:


Windows uses two .INI files for configuration: SYSTEM.INI and WIN.INI. The SYSTEM.INI is the Windows version of the MS-DOS CONFIG.SYS file. It initializes all the resources. The WIN.INI file is like the AUTOEXEC.BAT used by MS-DOS. It defines the "personalization" of Windows such as screen savers, colors, fonts, associations, and how resources will interact with applications. The WIN.INI file is also the dumping ground for settings that do not seem to have a home anywhere else. The information stored in these two files holds the secret to operating, optimizing, and troubleshooting Windows. Even though Windows has SYSTEM.INI and WIN.INI, it still uses the CONFIG.SYS and AUTOEXEC.BAT files of MS-DOS for the basic setup of devices and the computer. Windows also needs to use the MS-DOS files to configure the machine so that it (Windows) can run.

Windows 3.x and Windows 95 offer a utility called SYSEDIT.EXE in the Windows\System directory that lets you edit the context on the WIN.INI, SYSTEM.INI, CONFIG.SYS, and AUTOEXEC.BAT files quickly within Windows, using a notepad-like editor.

Starting with Windows 95, most of the tasks performed by SYSTEM.INI and WIN.INI are now performed by the Registry.

Configuring the SYSTEM.INI File

To know SYSTEM.INI is to understand Windows. This file is the primary hardware configuration file for Windows. During installation, Windows creates all the sections in SYSTEM.INI, which, for the most part, should never be changed. However, one section—[386Enh]—is very important. Most of the problems associated with Windows (as opposed to Windows applications) that users encounter can be directly attributed to problems within this section.

The [386Enh] section stores all the values for 386 Enhanced Mode. Some of the more important items are:

  • 32BitDiskAccess=On/Off: 32-bit disk access can be turned off here if Windows won't start. If Windows won't start and you suspect this is the problem, use the win /d command. By starting Windows with this switch, you bypass 32-bit access. If Windows is OK, then turn this option off through the Virtual Memory/Change Menu in the Control Panel 386 Enhanced Menu, or just change on to off.
  • ComXIRq=Number: This is where a COM port number and the port's IRQ are defined. Useful with devices that require nonstandard COM ports.
  • EMMExclude=XXXX-XXXX: This command tunes the operation of the EMM range by excluding memory ranges that are required for specific drivers, thereby avoiding possible conflicts. Before Plug and Play, this command was often the only way to get some device drivers to load. Note that whenever an item=XXXX-XXXX statement is used in an EMM386 line or in the CONFIG.SYS file, an equivalent EMMExclude statement is required in this section of the SYSTEM.INI file.
  • EmmInclude=XXXX-XXXX: This command is the reverse of the preceding EMM command, allowing one to force inclusion of memory areas that might otherwise be left unused.
  • Max:Bps=768: Intermittent General Protection Faults (GPFs) can be caused by too few breakpoints. If this line is not in [386Enh] add it.

The following is an example of the [386Enh] section of a SYSTEM.INI file:

 [386Enh] device=vhhscand.386 device=C:\Netscape\system\vntstimd.exe device=C:\Netscape\system\vtcprac.386 device=C:\Netscape\system\pdwcomm.386 device=C:\Netscape\system\dial.386 device=SYMEVNT.386 32BITDISKACCESS=on device=*vpowerd ebios=*ebios device=vsndsys.386 mouse=*vmouse, msmouse.vxd device=*vpd woafont=dosapp.fon netheapsize=60 device=cs$cbuf.386 device=vpmtd.386 device=*vshare COMIrqSharing=on COM3Base=03E8 COM4Base=02E8 COM2FIFO=1 COM1Irq=4 COM1Base=03F8 COM2Irq=3 COM2Base=02F8 COM4Irq=2 MinTimeslice=20 WinTimeslice=100,50 WinExclusive=0 Com1AutoAssign=2 Com2AutoAssign=2 LPT1AutoAssign=60 keyboard=*vkd device=*enable 

The [Boot] section lists the drivers that must be loaded when Windows starts. Windows might not work if you incorrectly modify or delete one of these settings.

Configuring the WIN.INI File

The WIN.INI file is not required, and Windows will run without it. However, it can be helpful. Two important commands used in WIN.INI are:

  • Load=
  • Run=

These lines autoload programs when Windows starts. They act like a hidden Startup Group. (Any program icon placed in the Startup Group of the Program Manager will automatically start when Windows is started.) If a program continues to automatically load and run, and it has no icon in the Startup Group, it's being loaded in WIN.INI. The difference between Load and Run is that programs invoked by Run will start minimized.

Systems that have been upgraded to Windows 95 and 98 from Windows 3.1 might still have this file. Although it is not required—nor will Windows 95 or 98 create this file—Windows will use the file if it already exists. In that case, any Run and Load statements in this file will be activated as it was previously by Windows 3.1.

The WIN.INI file contains settings that affect the appearance of the Windows desktop, printer selections, and network connections. To edit this file, use the Control Panel or open it in any text editor (the Windows application Notepad will do the job). Close and save the file after you're done editing it.

Windows needs to be rebooted before any changes to WIN.INI take effect. Be very careful when editing—a single typo will cause an error or unexpected results.

The WIN.INI file contains several sections of related settings. Each section is defined by its header, which is displayed in square brackets [Windows]. Within each section are entries in the format keyname=value:

  • Keyname is the name of the setting.
  • Keynames are made up of digits and letters with no spaces.
  • Keynames must be immediately followed by an equal sign (=).
  • Value can be an integer, a string, or a quoted string.
  • Comments are preceded by a semicolon (;) and they work like the REM statements in CONFIG.SYS or AUTOEXEC.BAT files.
  • Always backup the WIN.INI file before editing.

The [Windows] section of the WIN.INI file makes changes to the Windows environment—for example which applications run when Windows is started, and how information appears on the screen. Some of its parameters are:

  • DoubleClickHeight=<pixels>: Specifies the height (in pixels) that the mouse can move between clicks when it is double-clicked. Default is 4. If movement exceeds this value, the double-click will be interpreted as two single clicks.
  • DoubleClickWidth=<pixels>: Specifies the width (in pixels) that the mouse can move between clicks when it is double-clicked. Default is 4. If movement exceeds this value, the double-click will be interpreted as two single clicks.
  • Load=<filename(s)>: Specifies applications to run (minimized) when Windows is started. Can include one or more filenames or applications—each must be separated by a space.
  • MenuDropAlignment=<0-or-1>: Specifies whether menus open right-aligned or left-aligned with the menu title. 0 means left-aligned and 1 means right-aligned.
  • Programs=<extensions>: Defines which files Windows considers to be applications. Defaults are .COM, .EXE, .BAT, and .PIF files.
  • Run=<filename(s)>: When started, Windows will run any application listed.

The [Desktop] section contains optional settings that control the appearance of the screen background and the positioning of windows and icons on the screen. Most of these setting can be changed using the Control Panel.

The [Fonts] Section of WIN.INI describes the fonts to be loaded when Windows starts.

Configuring the CONTROL.INI File

All sections in the CONTROL.INI file can be changed from the Control Panel. This is the recommended method. The following are the sections in the CONTROL.INI file:

  • [Current]: The current color scheme.
  • [Color schemes]: Descriptions of color schemes.
  • [Patterns]: Descriptions of the desktop patterns.
  • [Installed]: Installed device drivers.
  • [Screen Saver]: The current password used by the active screen saver (encrypted).
  • [Screen Saver.xxxxx]: Individual screen saver settings.
  • [Don't load]: This setting can be used to exclude items that are displayed in the Control Panel. List the name of the section to be excluded followed by "=1".

For example, you might want to edit the CONTROL.INI file directly if the screen-saver password has been forgotten. The screen-saver password can be removed by changing the following:

 [Screen Saver.Screen Save Name] PWProtected=1        (change to =0 to remove password protection) [ScreenSaver] Password=139xhfn9    (encrypted password - delete to remove password) 

Configuring the PROGMAN.INI File

This file controls the settings for the Program Manager Group files. Adding a section to PROGMAN.INI called [Restrictions] will add some protection for the group files. If these statement are not present, the value is assumed to be the default of 0, which means that the opposite of the statement will happen. The commands and syntax are:

  • NoRun=1: Disables the File Run command.
  • NoClose=1: Prevents the user from exiting Windows.
  • NoSaveSetting=1: Prevents the Program Manager layout from being saved on exit.
  • NoFileMenu=1: Removes the File menu from the Program Manager.
  • EditLevel=x: From 0, the default, to 4, establishes higher levels of restrictions.

Setting attributes as "read-only" can protect individual groups. To do this, locate the .GRP file in the File Manager, select File, next select Properties, and then check the Read Only check box.

Using Sysedit

Windows provides a program for editing the system files (AUTOEXEC.BAT, CONFIG.SYS, WIN.INI, SYSTEM.INI). This program resides in the Windows directory and is called Sysedit. Windows does not provide an icon for this program in the standard setup. However, if no icon exists, Sysedit can be run by selecting File and then Run from the Program Manager, and then typing Sysedit and pressing ENTER. If an icon does not exist, it can be created by selecting New from the File menu in the Program Manager.

Configuring Virtual Memory

As mentioned earlier in this chapter, virtual memory allows the processor to use the hard drive to simulate RAM. Applications can access this simulated memory through virtual addresses mapped onto physical addresses, which can be either in RAM or on the hard disk.

Virtual Memory Manager

All virtual memory is controlled by the Virtual Memory Manager (VMM). The VMM divides memory into 4-KB pages and then maintains a page table to keep track of where everything goes (in RAM or on the hard drive). When the amount of free RAM reaches a critical level, a portion of RAM is set aside for page swapping. Windows uses a temporary or permanent swap file on the disk for writing the least recently used page frames of physical RAM.

Temporary Swap File

A temporary swap file is recommended when a computer is low on disk space because the file can increase or decrease in size as necessary. The temporary file is called \Windows\Win386.swp, and it's deleted when you exit Windows.

Permanent Swap File

When disk space is not a problem, a permanent swap file is recommended. Permanent swap files are faster to access than temporary swap files because they use contiguous blocks (clusters) of the hard disk drive to store data.

Sizing Virtual Memory

The required size of virtual memory varies with every machine and depends upon the memory requirements of the applications that will be run at the same time. When setting up virtual memory, consider the following:

  • Total memory requirements of the computer should equal RAM plus the size of the swap file.
  • The maximum swap file should not be larger than three times the size of RAM memory.
  • Maximum total virtual memory should not be larger than four times the size of RAM.

To determine the actual memory requirements for a machine, add together all the memory requirements for each application to be run concurrently and add an extra 1 MB each for MS-DOS and Windows.

Swap File Settings

Swap files are modified using the Control Panel's 386 Enhanced icon. Select the Virtual Memory button on the right side of the dialog box. The following settings are recommended:

  • Drive: Use the disk drive with the most available space. Do not select any removable drives such as floppy disk drives or Zip drives (they are too slow).
  • Type: For best performance, use a permanent swap file (be sure to defragment the drive first—this will provide a space for a contiguous file).
  • Space Available: Calculate the recommended size. Consult your application manuals to determine the amount of memory required to run each of them. Use a value large enough to support the workload on the computer, but do not exceed the recommended maximum size as suggested by Windows in the Virtual Memory dialog box.
  • 32-bit access: Use 32-bit access if available. It requires a Western Digital WD1003, or compatible, drive. Using 32-bit disk access allows Windows to talk directly to the hard drive, (thereby skipping the requirement to open an MS-DOS session), which then talks to the BIOS and then to the drive. 32-bit file access can be used with Windows 3.11 or Windows for Workgroups. It works the same as 32-bit disk access and can often speed up drive access. 32-bit file access is not hardware-sensitive and can often work when 32-bit disk access won't.

If the drive controller is not compatible, this option will not be available.

Out of Memory

"Out of memory" messages from Windows usually means "out of conventional memory." However, it can also mean there is a shortage of virtual memory. Try closing files or increasing virtual memory as a temporary fix. If the message continues to appear, even after a reboot, the memory usage of the system should be evaluated and modified if needed.

Improving Hard Disk Drive Speed

In addition to improving memory, the operation of Windows can be enhanced by speeding up the hard disk drive speed by using disk cache and RAMDrive.

RAMDrive is an MS-DOS utility that lets you use memory (RAM) to create a virtual disk. This was a good method for improving performance when applications were run from a floppy disk. You could create a virtual drive and copy the application to this drive. Then, by running from the virtual drive, you would experience a dramatic increase in performance. The problem with this system is that each time you turn the computer off and then back on, you have to re-create the drive and copy the files. A RAMDrive is the opposite of a swap file. It is RAM that thinks it is a drive. As with any drive, RAMDrive has a drive letter, and the user can read, write, copy, and delete to and from it.

Installing a disk cache is one of the best methods for improving the performance of Windows. A disk cache is similar to a memory cache, except that it works between the mass-storage devices (hard disk drives, CD-ROM drives, and floppy disk drives) and RAM. Most applications use the same files over and over again. By creating a disk cache, the computer takes a piece of extended memory and uses it to hold the repetitive files. Because access to RAM is faster than disk access, the overall performance of the system improves. The most popular disk cache is SMARTDRV.EXE which comes with MS-DOS.

Using disk caching can be problematic: it is the exact opposite of virtual memory. Disk caching uses memory to improve performance, and virtual memory uses disks to improve performance. As a computer technician, you will have to strive to achieve the best compromise between the two, based on the situation.


SMARTDRV.EXE can be run by simply adding it to the AUTOEXEC.BAT file, but it can be made to perform even better by adding a few switches. The performance of the disk cache is measured by its hit rate, the percentage of time that data requested by the operating system is already in the cache; therefore, it doesn't have to be read from the hard disk drive. A good hit rate will be between 75 and 90 percent. A good SMARTDRIVE configuration (in the AUTOEXEC.BAT file) looks something like this:

 SMARTDRVE a- b- 1024 256 /B:32 

"a- b-" means not to cache the floppy drives (floppy disks usually don't contain files that are repeated often).

"1024 256" sets the size for the cache. The rule for cache size is to make it equal to one-quarter the size of the total RAM (up to 2 MB), as shown in the following table. Performance gained by using SMARTDrive tends to drop off after 2 MB.

RAM (MB) Cache
<1 None
1 256 KB
2 512 KB
4 1 MB
8 2 MB
16 2 MB
>16 2 MB

"/B:32" increases the look-ahead buffer if the hard drive is maintained in a defragmented state. The default value is 16 without the /B option.

Other SMARTDrive options are shown in the following table.

Switch Description
/E Changes the number of bytes processed by SMARTDrive.
/L Loads low—by default, SMARTDrive loads in high memory. This switch forces it to load into low memory.
/N Doesn't wait for the C prompt upon lazy write. This is very risky because the system can return to the C prompt without flushing the cache. If the computer is turned off, data can be lost.
/Q Quiet mode—does not show anything on the screen when loading SMARTDrive.
/U Does not load the CD-ROM cache.
/V Verbose mode—shows everything on the screen when loading SMARTDrive.
/X Turns off lazy writing. A lazy-writing disk cache stores saved data in the cache and waits until the system has slowed down before writing to the disk. The file is not really saved, and if the computer is turned off for any reason before the data is actually saved, data will be lost.

A few switches also enable SMARTDrive tools. When SMARTDrive is running, enter the following at the MS-DOS prompt for the listed result:

Command Result
SMARTDRV /S Returns the current hit rate.
SMARTDRV /R Forces immediate flush of all lazy-write data in cache.
SMARTDRV /R Flushes and restarts the cache.


Windows 3.11 and Windows for Workgroups include a replacement for SMARTDrive. This replacement is a protected-mode disk cache called "Vcache." Vcache is set by making changes in the Virtual Memory (Change button) window, found in the Virtual Memory Setup dialog box (the 386 Enhanced icon in the Control Panel). Vcache runs up to eight times faster than SMARTDrive. The only disadvantage is that it does not cache the CD-ROM. However, it does run with SMARTDrive (simply configure SMARTDrive to cache only the CD).

Temp Files

Many applications need to store data on a temporary basis. To do this, temporary files are created and stored in the same directory. All temp files have the extension .TMP and are usually found in the Windows/Temp directory. This directory can be changed at any time by adding the statement SET TEMP=<PATH> to the AUTOEXEC.BAT file.

It is a good idea to periodically clean out the temp files by deleting them. Be careful when doing this, because one or more of them might be in use. In general, as long as you delete any temporary files created before the current computer session, they will not be in use. There are two ways to automatically remove temporary files. One is to create a batch file to delete the contents of the temporary directory and run it from the AUTOEXEC.BAT file. The other is to create a RAMDrive and store the temporary folder in that drive.

To make a RAMDrive, and command Windows to save all temp files to the RAMDrive, add the following to the AUTOEXEC.BAT file:

 Device=c:\dos\ramdrive 1024 md d:\temp SET TEMP=d:\temp 

Which drive letter you use depends on the system and which drive letter is the next available.

Memory Configuration

Most intermittent lockups and General Protection Faults can be blamed on poor MS-DOS memory management. To minimize the possibility of lockups and GPFs, Windows provides a few solutions that you should be familiar with.

EMMExclude and EMMInclude

If you have exclude or include statements (such as to accommodate memory reserved for video cards) in your CONFIG.SYS file, they need corresponding EMMExclude and EMMInclude lines in your SYSTEM.INI file under the [386Enh] section.

Translation Buffers

Windows needs UMB (upper memory block) space for what are known as its translation buffers. Translation buffers are small storage areas of RAM that are used to support MS-DOS applications and networks. If you are loading a lot of devices into UMBs, you should add WIN= statements to the EMM386.EXE line of the CONFIG.SYS (to identify memory location). For example:


Running MS-DOS Applications from Windows

By running MS-DOS in a virtual 8086 machine, Windows remains in memory and active. Therefore Windows functions like Cut, Copy, and Paste can be used between MS-DOS applications and the Windows application. Switching between the MS-DOS application and the Windows application is carried out in the same way as between any two Windows applications, by pressing the ALT and TAB keys at the same time. MS-DOS applications can be run either using the full screen or inside a window. To make an MS-DOS application operate properly, Windows uses a .PIF (Program Information File) to hold the necessary data to set up the virtual machine.

Most MS-DOS applications are provided with their own .PIFs that include the optimum settings. When these are provided, they should be used. Usually, .PIFs are located in the same directory as the program executable file. If no .PIF is provided, Windows will use its default .PIF. If there are problems running the program, or no .PIFs exist, the current .PIF can be modified or a new one created. To create or modify this file, use the .PIF editor utility provided by Windows.

Settings for .PIFs

The following table sets out settings available for MS-DOS .PIFs.

Setting Description
Advanced options Additional options made available by clicking the Advanced button. Options include setting the multitasking priority, adding more memory options, and allowing Windows to quit with the application open.
Close window on exit If box is unchecked, the window will stay open when the application terminates.
Display usage Determines whether the application is to be run in a window or full screen.
Execution Selects whether the program is to be run in the background (with other Windows applications running) or exclusively (suspends all other applications).
Memory Sets the minimum amount of conventional memory required for the application to start. Use 0 for "not needed" and -1 for "no limit."
Optional parameters Includes switches or other command settings.
Program file name Includes the drive, path, and filename of the MS-DOS program.
Startup directory Specifies the working directory for the application.
Video memory Selects text, low graphics, or high graphics. This ensures that Windows sets aside enough memory for the video mode used by the application.
Window title This title will be displayed on the Window title bar.

Troubleshooting Windows 3.x

Windows 3.x problems can be divided into three distinct groups: lockups (the computer locks up without any errors—in other words, the machine simply refuses to operate); GPFs; and erratics (strange behavior by programs or devices apart from locking up or generating errors).


Lockups are simple: the machine no longer responds to input and doesn't display any errors. Lockups tend to indicate fairly serious hardware problems and need to be dealt with aggressively, because there is a risk of data corruption and loss.

Unlike Windows 3.x, if a single applications locks up in Windows 95 or 98, it does not lock up the whole computer. You can press CTRL+ALT+DEL to get to the Task dialog box and close the offending application.

Symptoms of a lockup are:

  • The mouse pointer doesn't move. (Hint: if the mouse doesn't work, try the keyboard; this will confirm whether the problem is caused by the mouse or a lockup.)
  • Keyboard controls don't work.
  • The machine seems to be frozen.

There are a few common causes of lockups.

Incorrect Drivers

Using incorrect drivers are among the most common causes of lockups and intermittent program crashes. Make sure that video cards, hard disk drives, sound cards, and so forth are using the proper drivers. Always back up old drivers when you are updating, just in case you have problems. That way at least you can go back to a working machine if the new driver locks up your machine.

Power Supply

Lockups created by power supplies tend to be intermittent. The system locks up for no apparent reason—no particular application or function seems to cause the problem. If the power supply is the problem, the errors will show up in MS-DOS, Windows, or any other operating systems that you use.

If a power supply is the suspect, turn off the machine, turn it back on, and walk away for ten minutes. If, after you come back, the machine is still locked up, the power supply is the problem.

Corrupted Files

Corrupted files are files that have been damaged by bad hard disk drives, floppy disks, CD-ROMs, or corrupted software.

The major symptom of a corrupted file is that the lockup takes place at the exact same time, every time, in the execution of a particular file. For example, suppose that every time you start an application, it locks up when it reaches a certain point. Run ScanDisk to determine whether the problem is with the hard disk. If running ScanDisk doesn't correct the problem, try reinstalling the application in another directory so that it does not write over the same area of the hard disk.

Corrupted files can be created by improperly shutting down Windows. You should never simply shut off a computer; close all applications and properly stop the operating system first.

If you click an icon and receive an "application not found" error, this typically indicates that the software needs to be reinstalled, or that the application has been moved and the icon can no longer find it.

Corrupted Swap Files

Lockups caused by corrupted swap files tend to show themselves when Windows is first starting or when it is shutting down. Turn off the swap files and try restarting Windows. If you can get into Windows, find the 386SPART.PAR file and erase it. Windows will give an error on startup, but it will start up. Defragment the drive, and re-create the swap file.


Bad RAM lockups are easily detected—if a RAM chip is so bad that it can cause a lockup in Windows, the HIMEM.SYS file will detect it. Reboot the computer and watch HIMEM.SYS while it's loading—use the F8 key if necessary. If the RAM is bad, you will see an error message like: "HIMEM has detected unreliable XMS memory at XXXX:XXXXXXXX."

Lockups due to bad RAM chips look a lot like power-supply lockups. Most RAM problems show up as errors or GPFs.

IRQ and DMA Conflicts

Lockups generated by IRQ and DMA conflicts are created when the two hardware devices begin to speak at the same time. Not all IRQ and DMA conflicts manifest themselves as lockups. Remember that IRQ/DMA conflicts don't happen on machines that were "working fine before." Invariably, these lockups take place on computers on which a device has recently been added or changed.

General Protection Faults

General Protection Faults (GPFs—also known to old-time Windows users as "The Blue Screen of Death") fall into four categories.

Memory-Management Problems

Memory-management problems show up as GPFs in KRNL386.EXE. Typically, these are found in machines that are running MS-DOS applications and have been incorrectly configured. Pay particular attention to the proper use of exclude statements on the EMM386.EXE line.

GDI Errors

GDI (Graphical Device Interface) errors indicate a resource-heap overflow. A GPF caused by a GDI heap overflow can be visually exciting. Typically, these occur on machines with animated screen savers that run along with some minimized high-powered applications such as PowerPoint or Excel. Usually, the animated part of the screen saver will disappear. Deactivating the screen saver will often cause all the icons to turn into white squares, or parts of the desktop to disappear. This is caused by the GDI heap losing all data about the attributes of each icon. With resource-heap overflows, the only surefire cure is to quit trying to do so many things at once, or to upgrade to Windows 9x, Windows NT, or Windows 2000 which do not have resource heaps limited to 64 KB each. In this case, the addition of RAM (the usual cure for not being able to run all the programs you want at the same time) will not help. Remember, RAM is only one of the computer's resources.

Application-Specific Errors

Application-specific errors are frustrating because there is nothing you can do to make them go away. In order to fix these errors, the application software must be repaired at the source. When these errors occur, contact the company that makes that software—often there is a "patch" (which can usually be downloaded from the company's Web site) available to repair the problem.

If a GPF is created by bad RAM, it will occur over and over again at a specific memory address. You will be able to detect this by writing down the exact message on the GPF screen. If the address noted in the message is the same, time after time, you can suspect bad RAM.

Erratic Behavior

When the computer begins to act strangely, this is known as "erratic behavior." Video cards are notorious for erratic behavior that can be as innocuous as colored dots on the screen (wherever the mouse has been moved) to the occasional glitch after installing the latest video driver.

Printer drivers can create problems by causing the printer to spew forth nonsense characters that bear no resemblance to the original text or graphic image.

To resolve these problems, you must first identify the problem driver. For video drivers, go into the Control Panel and select the Microsoft VGA driver. It is very slow but will cause no problems. After the driver has been identified, go online (either through the Internet or directly with the company) and verify that you are using the latest version for your particular device. Also check for an odd setting in the .INI file that goes with the driver. The .INI file will share the same name as the driver, but not all drivers have .INI files.

Lesson Summary

The following points summarize the main elements of this lesson:

  • Windows 3.x is an operating environment that runs on top of MS-DOS.
  • Windows uses a GUI (graphical user interface) instead of the command line interface of MS-DOS.
  • In addition to the MS-DOS configuration files, Windows uses .INI files.
  • WIN.INI, SYSTEM.INI, and CONTROL.INI are the primary configuration files for Windows.
  • Sysedit is used to modify system files.
  • Windows also uses DLL (dynamic-link library) files to configure and run applications.
  • MS-DOS applications will run in Windows, but might require special settings to run properly. A .PIF file is used to create these settings.
  • Windows uses protected mode to allow the multitasking of applications.
  • General Protection Faults (GPFs) occur when an application tries to use resources allocated to other applications.

Microsoft Corporation - A+ Certification Training Kit
Microsoft Corporation - A+ Certification Training Kit
Year: 2000
Pages: 127

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net