Intro to Computers

Syllabus | Assignments | Main | Meet the Teacher | E-mail the Teacher


Hardware Basics


Before launching into the chapter assignments in Long/Longs's Computers, there are some basic computer concepts that are prerequisite to competent problem evaluation and program design. Read the section and answer the following questions in detail. Save the answers as SEC_1.TXT and attach it to an e-mail by the date listed in Assignments.

Systems Overview

To successfully complete this course, you need to have an understanding, at least in general, of what the major components are and how they work together. You also need to understand the boot process, which comprises the steps the system goes through to start up and load the operating system (such as DOS, Windows 95, or Windows NT). This section gives you an overview of your system and how it works, covering these topics:

First, you should understand what the system contains.

Overview of System Components

Your system contains many components that work together to create a working computer. This section provides an overview of the major components to help you understand how the components work together and how the system boots. If after reading the following sections you would like to know more about hardware specifications, please consider enrolling in CIS215, Hardware Installation/Maintenance.

The Motherboard, CPU, and BIOS

Inside your computer's case you'll find the motherboard, which is the computer's main circuit board (see Figure 1.1). The motherboard is where the majority of the computer's non-removable components and support circuitry reside. It's a big circuit board measuring roughly 12x13 3/4 inches (the standard size of an AT-class motherboard), although some motherboards might be slightly different in size.

In a few systems, the motherboard is actually fairly small. In these systems, adapters (such as video cards) don't plug into the motherboard. Instead, a riser card plugs into the motherboard and the adapters plug into the riser card. Some manufacturers use this system to enable them to make the case smaller. If your PC uses this type of design, you might not be able to upgrade the motherboard, because an after market motherboard might not fit in the case. Instead, you might have to also buy a new case. Fortunately, cases are not very expensive.

FIG. 1.1 The CPU resides on the motherboard and serves as the brains of the computer.


NOTE: An aftermarket motherboard is one sold as a replacement motherboard for an existing system. When you buy replacement windshield wiper blades, those are aftermarket blades.

In addition to containing a lot of support circuitry, the motherboard contains the CPU, or Central Processing Unit. The CPU is the brains of the computer and is where the majority of the computing takes place. It's the mother of all microprocessors in your PC. Your system might contain a 386, 486, 586, or Pentium CPU.


NOTE: In the early days of the PC, Intel Corporation was the only manufacturer of CPUs for the PC. Today, other companies also manufacture CPUs, although Intel still makes a majority of the CPUs in use in today's PCs. The numbers 386 and 486 come from the Intel's part numbers for the CPUs, which are 80386 and 80486. Intel originally planned to release a 586 chip, but decided to name it Pentium instead so it could copyright the name. Other manufacturers continued with the numbering scheme and name their Pentium-compatible chips the 586 (or something similar). Students can learn more about processorss in CIS215, Hardware Installation/Maintenance.

Also on the motherboard are all sorts of other components that support the CPU. One of these components is the BIOS, which stands for Basic Input Output System. The BIOS is a microchip that stores a small set of programs that enable the PC to perform very basic functions such as accessing the hard disk (see Figure 1.2). The BIOS also contains the code that enables the computer to perform its Power On Self Test (POST), and start up, or boot, the operating system.

FIG. 1.2 The BIOS is an important component that enables the PC to perform basic services.

The important concept to understand about the BIOS, at this point, is that it contains program code (called firmware because it falls logically between hardware and software) that enables the computer to perform certain functions even without the help of the CPU. It also contains program code that lets the CPU access various other hardware components before any operating system is present.

RAM

RAM stands for Random Access Memory. The RAM in your system (see Figure 1.3) serves as short-term memory for the computer, while the hard disk serves as long-term storage. When you're running a program, some or all of the program is loaded into RAM. Also, a document or data file you're working with in the program usually is stored in RAM. When you save the document, the program essentially copies it from RAM to disk.

In addition to your programs and documents, much of the operating system resides in RAM. Some portions of the operating system that aren't required at the moment for the system to operate are stored on disk until they're needed. You learn more about operating systems in CIS130, "Survey of Operating Systems."

FIG. 1.3 RAM serves as temporary working memory to contain the operating system, programs, and data while the PC is on.


Hard Disk and Floppy Disk Drives

Your system's disks serve as long-term storage. The system contains at least one hard disk and one floppy disk. The hard disk is located inside the computer's case where you can't see it. Trust me--it's there. Figure 1.4 shows a hard disk mounted inside a PC. The front of the floppy disk drive is accessible in the front of the computer so you can insert floppy disks into it.

FIG. 1.4 The hard disk mounts inside the computer, usually where you can't see it from the outside.

The hard disk is where the majority of your files reside. The operating system is stored on the hard disk, as is the vast majority of your programs and documents. When you run a program, the operating system reads the program from the hard disk, copying various parts of the program into RAM (enough to run the program). The program then can read more of its program code from the disk as needed. For example, the part of the program that lets you print a document might not be loaded into memory until you actually choose the menu command that starts the printing process. Fortunately, all that stuff happens automatically.

An important point to understand is that when you run a program, the system doesn't move the program from the hard disk to RAM. It just reads it from the disk. It's like reading a book: When you read, you don't lift the words off the paper and stuff them in your head. You just copy them into your brain for temporary use.


NOTE: An increasing number of programs are being published on CD instead of (or in addition to) floppy disks. With many of these CD-based programs, you can run the program from the CD. This means that the majority of the program is read from the CD and is never copied to your hard disk. In effect, the CD acts as long-term storage for the program.

In a lot of cases, however, at least a small portion of the program is copied to the hard disk. Usually, this is done to make the program start or run faster. Even with a portion of the program on your hard disk, keeping the majority on the CD is still a great idea. Instead of using hundreds of megabytes of space on the hard disk for the program, the program might only require a few megabytes.


Although you might store some of your documents on floppy disks, you're more likely to use the floppy disk drive only when installing a program or when backing up files. Two common sizes of floppy disks are used: 5 1/4-inch and 3 1/2 -inch. The 5 1/4 -inch floppies really are floppy--their flexible sleeves let you bend them (but don't do it, because you could ruin the disk and lose its contents). More prevalent today are the 3 1/2 -inch disks that use a rigid plastic case to house the disk. The disk itself is still floppy, just like the 5 1/4 -inch disks. Disks come in four different formats: 360K and 1.2M for the 5 1/4 -inch disks, and 720K and 1.44M for the 3 1/2 -inch disks.

Another important use for the floppy disk drive is to enable you to boot the system when the hard disk is unreadable for some reason. CIS215, Hardware Installation/Maintenance, explains in greater detail how to deal with mechanical problems.

The important point to understand about the floppy drives is that if the system contains two drives, they are recognized by the system as drive A and drive B. The system is only able to boot from drive A, so you need to use drive A when you make a system disk. In almost every case, drive A is located above drive B in the case.


TIP: You might have a system with only one floppy disk drive. If yours contains only a 5 1/4-inch drive, it's probably a fairly old system. If your system has only a 3 1/2-inch drive, or you're going to be replacing the 5 1/4-inch drive with a 3 1/2-inch drive, you might be worried about not being able to read 5 1/4-inch floppies you might have. If so, you can get a combination drive that contains both a 3 1/2-inch drive and 5 1/4- inch drive in one unit. I installed such a drive in one of my systems a few years ago, and as far as I can recall, I've never used the 5 1/4-inch part of the drive.
3 1/2-inch drives are more popular because they have a higher total capacity than 5 1/4-inch drives. Also, the disks are smaller, which means they take up less storage space. Their hard cases also make them less susceptible to damage.

Adapters

Also inside the computer you'll find a few adapters. These are circuit cards that plug in to the motherboard's bus slots. These adapters mount to the back of the PC's case and typically include connectors that stick out the back of the PC. The computer's video card is an example of an adapter (see Figure 1.5). Network interface cards, hard disk controllers, internal modems, and sound cards all are examples of adapters. Basically, any card that plugs into the motherboard and mounts to the back of the case is an adapter.

FIG. 1.5 Adapters plug into the motherboard's bus slots and mount to the back of the PC's case.


NOTE: If yours is a relatively new system, some of the functions that used to be handled by adapters are handled directly on the motherboard. For example, most recent PC motherboards include the serial and parallel ports, IDE (for hard disks, CD-ROM drives, and tape drives), and mouse connectors right on the motherboard. In these systems, connector brackets are mounted on the back of the case where an adapter would otherwise mount, and connect to the motherboard. This gives you an easily accessible place to plug in various gadgets, such as the mouse. Rather than plug it directly into the motherboard, you plug it into the connector on the back of the PC.

Operating Systems

Without software, hardware is useless. Without software to make it run, hardware is just a collection of electronic components, metal, glass, and so on. You might be able to turn it on, but it won't do anything except hum contentedly.

The program code stored in the system's BIOS gives the system a very small level of functionality. Even so, the code in the BIOS does very little except provide a means for the system to perform some self-diagnostics and access peripherals like hard disks on a very basic level. But in addition, the BIOS also is responsible for getting the operating system booted.

What Is an Operating System?

An operating system is a collection of programs and related software that enable a computer to function. By function, I mean that the computer recognizes and controls hardware, both at the very low level on the motherboard and at the higher level on peripheral devices such as disk drives, the display, printers, and so on. It also runs programs, takes input, and generates output. These basic functions essentially enable the CPU to interact with all of the components in the computer. The operating system provides this capability typically through device drivers.


What Are Device Drivers?
In generic terms, a driver is a program that enables an operating system to communicate with and control a device. Some capabilities for controlling and accessing devices are built into DOS. For example, DOS can read a hard disk without having to load any special drivers in CONFIG.SYS because the program code to read the disk is built into the core operating system that gets loaded through IO.SYS and MSDOS.SYS.

DOS doesn't have the built-in capability to communicate with a CD-ROM drive, and that's a good example of where DOS needs an external driver. If your DOS system contains a CD-ROM drive, you'll find a line in CONFIG.SYS that specifies the driver for the drive. This driver gets loaded and becomes part of the operating system when CONFIG.SYS is read and processed during boot. Other common devices not directly supported by DOS include, among others, sound cards and mice.

Some devices require more than just a driver. A CD-ROM drive, for example, typically requires two drivers. The first enables the system to access the device and communicate with it, and the second (usually MSCDEX.EXE) enables DOS to work with the CD's file system. MSCDEX is loaded by the second configuration file, AUTOEXEC.BAT. The key concept about drivers is that they enable the operating system to control and use devices for which it doesn't have built-in support. This is true for any operating system.


This portion of the operating system is geared toward the internal workings of the computer rather than to giving you a means to work with the computer. An additional function of most operating systems is to provide a mechanism that lets you, the user, interact with the computer and its components.

The portion of the operating system that lets you interact with the computer is called a user interface. In DOS, the user interface is a cryptic command prompt generated by the command interpreter, COMMAND.COM. With Windows 3.x, the graphical user interface (GUI) is not actually part of the operating system. Instead, Windows 3.x is a program that provides a graphical interface to your computer and also gives you a consistent means of running other programs.

In Windows 95 and Windows NT, the GUI is an integral part of the operating system. It performs the same function as Windows 3.x in giving you a consistent, easy-to-use interface with which to use your computer.

You don't need a technical understanding of how operating systems do their job. You just need to understand that without an operating system, your computer is a great big doorstop that only a junk dealer could love. With an operating system and slick GUI, your computer is an indispensable tool.

How does the operating system get onto your computer? Either you install it or the manufacturer or vendor installs it. In either case, the operating system resides on the computer's hard disk. When the system is turned on, the operating system boots, as explained in the next section.

The Boot Process

Now that you have a little bit of background about the components in your PC, you're ready to learn how the system boots. The term boot comes from the word bootstrap, which refers to the PC's ability to figuratively pull itself up by its bootstraps and load its own operating system. Understanding the process the system goes through to boot will help you when it comes time to troubleshoot an upgrade. It also helps you understand how and when devices become recognized and accessible by the system.

If you feel like you're reaching information overload when you read the following sections, don't worry; it's enough at this point that you understand the general concepts, if not the specifics. We must first learn the technical aspects of the boot process, before we can understand the section "The Big Picture--Controlling the Boot Process" later in this section.


NOTE: The boot process involves a lot of steps, many of which would be interesting only to the terminally curious. For example, the first thing that happens in the entire process is the power supply performs a power-on self test, and when the voltages and current levels it is generating are acceptable, it sends a Power Good signal to the motherboard. I've left out these gut-level steps and concentrated in the following sections on the high-level steps in the boot process that you can recognize and/or control yourself.

If you're one of those terminally curious people, check out CIS215, "Hardware Installation/Maintenance" to learn every step in the boot process.

Low-Level Testing

Initially, the system's ROM code begins executing. This is program code stored in a read-only memory chip on the motherboard. The system tests basic functionality, including scanning memory for video adapter ROM BIOS program code. In other words, the system looks for a video adapter and instructions on how to handle it when it finds it.

The POST

The acronym POST stands for Power On Self Test. The POST is a program routine built into the system's BIOS, which is stored in a chip on the motherboard. The POST, which executes each time you turn on the PC or perform a cold reboot (such as pressing the Reset button), is essentially a mini-program that tests some of the PC's hardware.

For example, the POST tests the PC's RAM to make sure it is working properly. The POST tests the CPU, motherboard support circuitry, and other major components, including the keyboard. If the POST can't find the keyboard, for example, or the keyboard isn't working, the POST displays an error message similar to Keyboard failure to let you know there is a problem.

The diagnostic tests that the POST performs are not very thorough, but they can identify major problems. For example, the memory test can locate gross memory failures, but probably won't detect more subtle memory problems. Nevertheless, the POST serves an important function in identifying problems. If an error occurs during the POST, it generates an error message on the monitor. Many errors also generate audible error tones (series of beeps).

Reading the Boot Sector

After the POST completes successfully, code in the BIOS starts looking for a boot sector. A boot sector is a sector on a disk that contains a bootstrap program. This bootstrap program contains the instructions necessary to locate and load an operating system.

The BIOS code looks first on the disk in drive A for a boot sector. If the floppy disk contains a valid boot sector and bootstrap program, the BIOS loads the bootstrap program and turns over execution to it. If no drive is inserted in drive A, the system looks on the hard disk for the boot sector. If there is a disk in drive A, but it isn't a system disk (and therefore doesn't contain a bootstrap program), the BIOS generates a message informing you that the disk isn't bootable and that you need to replace it with one that is.


NOTE: Most recent BIOSes enable you to specify the order in which the BIOS checks for an operating system on drive A and drive C. Most systems default to searching drive A first. However, configuring the BIOS to search drive C first can overcome the potential for infecting your system with a boot virus from a floppy disk.

The Bootstrap Program and Beyond

When the BIOS finds a bootstrap program, the BIOS turns over operation to it. What the bootstrap program does at that point depends on the operating system with which the disk was formatted.


NOTE: In this section, file names that pertain to DOS systems are all in uppercase, as in CONFIG.SYS. File names for Windows 95 and Windows NT systems are shown with an initial capital letter only because that's the way they appear in Explorer. Also, the terms directory and folder are used interchangeably.

DOS Systems

The DOS bootstrap program is rather self-centered and doesn't recognize the possibility of other operating systems. It assumes you want to boot DOS, regardless of whether the hard disk might contain other operating systems also. The DOS bootstrap program looks for two hidden system files, IO.SYS and MSDOS.SYS (IBMBIO.COM and IBMDOS.SYS on some systems), that reside on the boot disk. These two files contain the core DOS operating system.

IO.SYS loads first. The code in it then loads MSDOS.SYS, which initializes base device drivers, enabling the system to begin accessing the file system and devices connected to the system.

Next, the system configuration file CONFIG.SYS is processed. The CONFIG.SYS file is a text-only file that contains settings and commands that basically configure the system hardware and the way it runs. For example, most device drivers required by the system, such as a driver to enable the system to read the CD-ROM drive, are specified in CONFIG.SYS. The important point to understand about CONFIG.SYS is that you can change the way the system boots just by editing the file and changing CONFIG.SYS' contents. You learn more about CONFIG.SYS in the section "Startup Files" later in this section.


NOTE: DOS actually reads CONFIG.SYS multiple times during boot. The DEVICE, INSTALL, and SHELL statements are processed first, then remaining statements are processed. So, the order in which commands other than these three appear in CONFIG.SYS isn't important.

After processing CONFIG.SYS, COMMAND.COM processes the file AUTOEXEC. BAT, which, like CONFIG.SYS, is located in the root directory of the boot disk. While CONFIG.SYS generally controls the system's hardware configuration, AUTOEXEC.BAT more generally controls its software configuration.

AUTOEXEC.BAT can contain settings the system uses to operate. An example is the PATH statement, which defines the directory path DOS searches for files that aren't located in the current directory. AUTOEXEC.BAT can also be used to start programs, including loading device drivers. On many systems, the last statement in AUTOEXEC.BAT, WIN executes the WIN.COM program that starts Windows 3.x. Whether or not AUTOEXEC.BAT loads Windows, processing AUTOEXEC. BAT is the last step in the boot process for DOS systems.


NOTE: If no AUTOEXEC.BAT file exists, COMMAND.COM executes its internal DATE and TIME commands, then displays a command prompt.

As with CONFIG.SYS, the important point to understand about AUTOEXEC.BAT is that it is a text file whose contents you can edit to control the way the system boots and runs. You learn more about AUTOEXEC.BAT in the section "Understanding Startup Files" later in this section.

Windows 95 Systems

On a Windows 95 system, the bootstrap program executes the file Winboot.sys, which is responsible for loading the Windows 95 operating system. Winboot.sys has the capability to display a boot menu at startup. The menu looks like this:

1. Normal
2. Logged (\BOOTLOG.TXT)
3. Safe mode
4. Safe mode with network support
5. Step-by-step confirmation
6. Command prompt only
7. Safe mode command prompt only
8. Previous version of MS-DOS


NOTE: The boot menu only appears automatically if the setting BootMenu=1 appears in the Msdos.sys file. You can cause the menu to appear by pressing F8 when you see the Starting Windows 95 message on the display. Option 8, which enables you to boot your previous version of DOS, only appears if the setting BootMulti=1 is included in the Msdos.sys file. You also can boot DOS by pressing F4 when you see the Starting Windows 95 message.

How Winboot.sys proceeds depends on whether the boot menu is displayed and what action you select from the boot menu (or whether you press a function key during the boot process to choose a specific boot mode). For a normal boot, Winboot.sys first processes Config.sys, if it exists. If Autoexec.bat exists, Winboot. sys loads Command.com to process Autoexec.bat. Then, Winboot.sys looks for and processes the first part of the Registry, which is contained in the file System.dat.

Because Winboot.sys automatically loads Himem.sys, Ifshlp.sys, and Setver.exe, these commands don't need to be present in Config.sys. In fact, you don't need a Config.sys file at all with Windows 95 unless you need to load drivers that aren't included with Windows 95. You also don't need a Win.ini file, although Windows 95 will create a generic one if one doesn't exist when the system starts.

The last step Winboot.sys performs is to execute Win.com, which loads the graphical portion of Windows 95. If you boot the system to a command prompt and then want to load the GUI, just enter WIN at the command prompt.

Windows NT Systems

When you install Windows NT, its Setup program modifies the boot sector of the hard disk to enable it to boot Windows NT. The code in the boot sector runs the NTLDR program, which is stored in the root directory of the boot disk. One of the first things that NTLDR does is read the Boot.ini file, which is located in the root directory of the hard disk. Boot.ini lists, among other things, the operating systems that are present on the computer and their boot locations. NTLDR then displays a boot menu you can use to select which operating system to load.

If your system was formatted with Windows 95 and you then installed Windows NT, for example, you'll see an item in the boot menu for Microsoft Windows; selecting that item boots Windows 95. You'll also see two options for booting Windows NT. The first boots Windows NT with its normal video mode, and the second forces Windows NT to boot using a standard VGA display. This VGA option is useful for reconfiguring your display if the current setting causes a problem.

After you choose one of the Windows NT items from the boot menu, NTLDR runs the program NTDETECT, which also is located in the root directory of the boot disk. NTDETECT checks the system's hardware and places that information in the appropriate keys in the Registry. Then, Windows NT starts loading the device drivers necessary to operate. Finally, it loads the GUI.

The Big Picture--Controlling the Boot Process

Now you have some information about how your system boots. What good is it? Aside from being useful for small talk at really boring parties, you can use the information to control the way your system boots. This is particularly helpful when you're installing new equipment and troubleshooting the system, especially when programming applications that initiate on startup. First, though, you need a little more background about your system's startup files.


TIP: The following sections explain the startup and configuration files your system uses. There is a lot of information provided--all certainly useful--but it might be more than you need at the moment. Even so, you need this information to competently program applications that initiate on start up. Later, we will review quick tips to control how your system boots, in the sections "Controlling Boot Under DOS," "Controlling Boot Under Windows 95," and "Controlling Boot Under Windows NT."

Understanding Startup Files

Regardless of the operating system your system contains, it uses one or more files to determine how to start the system. The following list describes the files as they relate to specific operating systems:

CONFIG.SYS--DOS and Windows 95

As mentioned briefly earlier in this section, DOS uses a file named CONFIG.SYS to control the system's hardware configuration. CONFIG.SYS is located in the root directory of the boot disk and typically contains statements that load device drivers and perform a handful of other possible tasks. Windows 95 checks for the presence of CONFIG.SYS and processes it if the file exists.

CONFIG.SYS is not required to boot either DOS or Windows 95. Most DOS systems do use a CONFIG.SYS file, however, because almost all DOS systems require device drivers to be loaded through CONFIG.SYS to access hardware and run Windows 3.x. Windows 95 systems need a CONFIG.SYS file only if you need to load a driver not included with Windows 95. An example is a real-mode driver for a sound card not supported directly by Windows 95.


NOTE: The CPU can run in different modes, two of which are real mode and protected mode. Windows 95 runs in protected mode, and so do Windows 95 drivers. If you have a device that doesn't include a Windows 95 driver and isn't supported directly by Windows 95, you can still use the device by loading a real-mode driver through CONFIG.SYS. The only real disadvantage to this is that the CPU has to switch between protected mode and real mode to work with the device, which slows down the system.

CONFIG.SYS is a text file, which means you can view and edit it with any text editor or word processing program such as the DOS EDIT program, Notepad, WordPad, System Editor, and so on. Figure 1.6 shows the System Editor (SYSEDIT.EXE) with CONFIG.SYS displayed.

FIG. 1.6 CONFIG.SYS is a text file located in the root directory of the boot disk, and contains settings that primarily configure the system's hardware.


NOTE: This section doesn't cover DOS configuration commands in detail, because you're probably using Windows 95 or Windows NT, which doesn't require CONFIG.SYS or AUTOEXEC.BAT statements. Instead, the material is intended to help you understand what your system contains and why, and also to help you troubleshoot problems later. Also, understanding these settings enables you to customize the way your Windows 95 system starts, because Windows 95 can use (but doesn't require) CONFIG.SYS and AUTOEXEC.BAT files.

The following list explains the most common statements (but not all) you'll find in the CONFIG.SYS file:

On Windows 95 systems, Io.sys automatically incorporates a group of settings and commands that are otherwise handled (on a DOS system) by settings in CONFIG.SYS. These include:

You don't have any way to modify Io.sys to change these default settings, but you can override them by creating a Config.sys file and placing in it corresponding entries with different settings. In the vast majority of cases, though, you shouldn't need to override these settings.

AUTOEXEC.BAT--DOS and Windows 95

Like CONFIG.SYS, AUTOEXEC.BAT is a text file located in the root directory of the boot disk, and is optional. AUTOEXEC.BAT is called a batch file because it processes a batch of statements or a batch of programs at one time.

Generally, AUTOEXEC.BAT contains statements that set environment variables and start terminate-and-stay-resident (TSR) programs. The environment variables define global settings for the computer, such as the directory path. The directory path is the path the operating system searches for files if it can't find them in the current directory. TSR programs often are drivers or programs that work in conjunction with drivers.

Because AUTOEXEC.BAT executes automatically at startup, it also can be used to execute other programs automatically at startup. The CALL statement lets you initiate another batch file. When that other batch file finishes running, control returns to AUTOEXEC.BAT and it continues processing with the next statement.

One common statement you find at the end of most AUTOEXEC.BAT files on DOS systems that also contain Windows 3.x is the WIN statement. This statement actually initiates the program WIN.COM, which loads Windows.

On Windows 95 systems, you don't need an Autoexec.bat file per se, but your system still might contain one. The primary reason to use an Autoexec.bat file under Windows 95 is to specify environment variables and load drivers that aren't included specifically with Windows 95. And, as you can under DOS, you can use Autoexec.bat under Windows 95 to automatically start programs when the system starts. As you learn later in the section "The Startup Group and Startup Folder," there are other methods for automatically starting Windows-based programs when Windows starts.

Systems with DOS and Windows 95

If your system contains both DOS and Windows 95, you actually have two sets of Autoexec.bat and Config.sys files. Windows 95 automatically renames the files according to which operating system you choose. Regardless of which operating system is running, the current, working copies of the files are always named Autoexec.bat and Config.sys.

When Windows 95 is running, the DOS configuration files are renamed to Config.dos and Autoexec.dos. When DOS is running, the Windows 95 configuration files (if any) are named CONFIG.W40 and AUTOEXEC.W40. So, if you boot the system to DOS and want to edit your Windows 95 startup files, make sure you edit CONFIG.W40 and AUTOEXEC.W40. If Windows 95 is running and you want to edit your DOS configuration files, make sure to edit Config.dos and Autoexec.dos.


NOTE: You can see from the file names Config.w40 and Autoexec.w40 that Microsoft originally intended to follow the numbering scheme for the Windows 95 revision and call it Windows 4.0. Marketing reasons and a desire to differentiate Windows 95 from Windows 3.x won over logic, however, and the name Windows 95 was born.

SYSTEM.INI--Windows 3.x, Windows 95, and Windows NT

The SYSTEM.INI file is used by all versions of Windows. In Windows 3.x, SYSTEM. INI is one of the primary means through which Windows stores its operating settings. In Windows 95 and Windows NT, the System.ini file is used primarily to provide compatibility with Windows 3.x programs. On these two operating systems, most settings are stored in the Registry instead.

SYSTEM.INI is a text file and is located in the Windows directory. Like CONFIG. SYS, SYSTEM.INI primarily controls hardware settings. The file is divided into sections, each section labeled with a header in brackets and settings for that section immediately following:

[386Enh]
device=mxvgrab.386
DEVICE=DVA.386
keyboard=*vkd
mouse=*vmouse

In this example, the [386Enh] label identifies the section, and the four settings following it all load Windows device drivers. Unlike CONFIG.SYS and AUTOEXEC.BAT, drivers specified in SYSTEM.INI do not load until Windows loads. Also, drivers that have an extension, such as mxvgrab.386, are located on disk in the Windows or Windows System directory (unless the driver callout includes a path). Drivers that are preceded by an asterisk are contained internally within Windows itself.

Generally, you won't need to edit SYSTEM.INI yourself, because settings are added to it automatically by Windows or by an application's Setup program. Occasionally, however, you might need to edit SYSTEM.INI yourself to remove a conflicting driver, add a driver manually, or make other minor changes. You can use the System Editor or any text editor to edit SYSTEM.INI.


CAUTION: If you use a word processing program to edit your system's configuration files, make sure you save the files in text-only format. If you save the files using the word processor's native file format (like a DOC file), the system won't be able to read the files.

WIN.INI--Windows 3.x, Windows 95, and Windows NT

All versions of Windows use a WIN.INI file to store various settings, most of which define operating parameters or software settings for Windows. Like SYSTEM.INI, the WIN.INI file is a text file located in the Windows directory. The structure of the WIN.INI file is similar to SYSTEM.INI, with multiple sections labeled by headers in brackets:

[windows]
load=C:\WINDOWS\CDIDLL.EXE
run=
NullPort=None
device=HP LaserJet IIIP,HPPCL5MS,\\Fred\laserjet

This example includes a variety of settings, including one (the first) that loads a program at startup. As with SYSTEM.INI, Windows modifies WIN.INI automatically. Applications also often use WIN.INI to store their own settings.

You will probably not have to modify WIN.INI yourself very often, but occasionally you might need to make minor changes to it to change the way Windows or other programs run. You can use the System Editor or any text editor to edit WIN.INI.


TIP: If one or more programs starts automatically when you start Windows, and you can't find a reference to those programs in the Startup group or folder, check the load= and run= lines in WIN.INI. These two settings can be used to start programs automatically when Windows starts.

PROGMAN.INI--Windows 3.x and Windows NT 3.x

Program Manager uses the PROGMAN.INI file to store its operating settings. PROGMAN.INI is similar in structure to WIN.INI and SYSTEM.INI, with different sections labeled by headers in brackets:

[Groups]
Group1=C:\WINDOWS\MAIN.GRP
Group2=C:\WINDOWS\PROGRAMS.GRP
Group3=C:\WINDOWS\ACCESSOR.GRP
Group4=C:\WINDOWS\STARTUP.GRP

[Settings]
Order= 6 7 9 1 8 10 13 3 14 12 4 2 11 5
Window=65 49 699 537 1

The Groupn settings specify the file name of Program Manager's group files (the files in which your program groups are stored). The [Settings] section contains settings that define the way Program Manager looks.

Program Manager modifies PROGMAN.INI as necessary to store its settings, but you can modify it manually, also. If you move a program group file, for example, you can simply change the Groupn setting that references it to point to the correct location.


TIP: You can include a [Restrictions] section in PROGMAN.INI that applies various levels of restrictions to Program Manager. You can use these restrictions to control users' ability to create and delete groups and program items and perform other actions. These restrictions aren't covered in this book because they don't really apply to upgrading PCs. For more information about the [Restrictions] section, check out Maximizing Windows from New Riders Publishing, or search the Microsoft Knowledge Base on Microsoft's Web site.

Msdos.sys--Windows 95

Windows 95 uses the Msdos.sys file to store settings that control the way the operating system boots. Msdos.sys is located in the root folder of the boot disk. It is a hidden, system, read-only file. You can, however, change the file's attributes so you can edit it and control the way Windows 95 starts. I explain how in just a bit.

Msdos.sys contains two sections: [Options] and [Paths]. The [Paths] section includes settings that specify paths to various Windows 95 files:

The [Options] section is the one you're most likely to need or want to modify. It can contain a variety of settings that determine how Windows 95 boots. Here are the settings you can use in the [Options] section:

Some of these settings are not very useful for the average person, but some can be very useful. In particular, all of the settings that begin with Boot offer an easy way for you to control the way your system boots in normal operation as well as when troubleshooting the system.

Before you start fiddling with Msdos.sys, you should make a backup copy on disk. If you screw up the file so badly that you can't get it back to normal, you can restore the backup copy.

To edit Msdos.sys, you first need to change its attributes. If you're working from the command prompt, use this command:

C:\>ATTRIB -S -H -R MSDOS.SYS

If you're working from within Windows 95, double-click My Computer, then double-click the boot disk's icon (probably drive C). If you don't see Msdos.sys in the folder, choose View, Options. Click the View tab, then choose the Show All Files option button and click OK. This lets you view the hidden files on the disk, of which Msdos.sys is one.

To change the attributes of Msdos.sys within Windows 95, right-click the file's icon and choose Properties. In the Attributes area of the property sheet, clear the Read-Only and Hidden check boxes.

Next, open Notepad or WordPad and load the Msdos.sys file into it. Make the changes you want, then save the file and close the text editor. Restore the read-only and hidden file attributes and restart the system to test your changes.

Boot.ini--Windows NT

Windows NT uses the Boot.ini file to control the Windows NT boot process. Boot.ini is a read-only, hidden system file in the root directory of the boot disk. Like many other Windows-related configuration files, Boot.ini includes sections labeled by headers in brackets, with settings for that section following underneath. Here's an example of a Boot.ini file:

[Boot Loader]
Timeout=15
Default=C:\
[Operating Systems]
C:\="Microsoft Windows 95"
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation Version Â4.00"
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation Version Â4.00 [VGA mode]" /basevideo /sos
multi(0)disk(0)rdisk(0)partition(1)\WINNT351="Windows NT Server Version Â3.51"
multi(0)disk(0)rdisk(0)partition(1)\WINNT351="Windows NT Server Version Â3.51 [VGA mode]" /basevideo /sos

In this sample, the system actually contains four operating systems, although only three are apparent from the Boot.ini file: Windows NT Workstation version 4.00, Windows NT Server version 3.51, and Windows 95. This particular system also contains MS-DOS, which can be booted by selecting the Microsoft Windows 95 option from the NTLDR boot menu, then choosing Option 8 from the Windows 95 boot menu.

The [Boot Loader] section contains two settings that help define the boot process:

multi(0)disk(0)rdisk(0)partition(1)\WINNT

The [Operating Systems] section defines the operating systems that are available from the boot menu. Note that each of the Windows NT installations includes an option to boot the system in VGA mode. The switches at the end of each VGA mode entry in the file, /basevideo/sos, cause Windows NT to boot in VGA mode, which enables you to boot the system when a problem occurs with the currently installed video driver.

You can edit Boot.ini manually, but it's easier to edit it from within Windows NT. To do so, open the Control Panel and double-click the System icon. On Windows NT 4.0 systems, click the Startup/Shutdown tab. Use the System Startup group of controls to specify the default operating system and boot delay (which correspond to the Default and Timeout settings, respectively). Figure 1.7 shows the System property sheet.

FIG. 1.7 You can control system startup in Windows NT 4.0 through the Startup/Shutdown tab of the System property sheet.

On Windows NT 3.5x systems, use the two controls in the Operating Systems group in the System dialog box (see Figure 1.8) to control the default operating system and the boot delay.

FIG. 1.8 On Windows NT 3.5x systems, use the System dialog box to control the boot process.


The Registry--Windows 95 and Windows NT

Windows NT and Windows 95 both use a Registry to store settings and other information that defines the way the system boots and runs. Microsoft likes to tout the Registry as a replacement for all those INI files and other configuration files required under Windows 3.x. Don't believe a word of it. Even on a system that has never contained anything other than Windows NT or Windows 95, you find plenty of INI files, many created by the operating system itself.

On Windows NT systems, the Registry comprises the six files located in the \Ntroot\System32\Config directory. You don't deal with the files individually, so their names are not important here.

On Windows 95 systems, the Registry comprises two files: System.dat and User.dat. The System.dat file incorporates global and system-specific settings, and User.dat incorporates user-related settings such as for desktop configuration.

It isn't terribly important that you understand where the Registry is stored. What's more important is that you understand how to modify settings in the Registry. You can make most changes through the Control Panel. When you change the wallpaper pattern through the Desktop icon in Control Panel, for example, you indirectly change a setting in the Registry. Whenever possible, you should modify the Registry only indirectly by using the Control Panel.

If you do need to edit the Registry, you can do so with the Registry Editor, which is included with Windows NT and Windows 95. Figure 1.9 shows the Windows 95 Registry Editor. To start the Registry Editor in Windows 95 and Windows NT 4.0, choose Start, Run, and enter REGEDIT in the Run dialog box. Under Windows NT 3.5x, choose File, Run in Program Manager and enter REGEDT32 in the Run dialog box.

FIG. 1.9 You can modify the Registry directly using the Registry Editor.

I won't go into a lot of detail on the Registry or Registry Editor because you seldom need to use it. It's covered simply to let you know what the Registry is and how you can edit the Registry if you're instructed to do so by an installation manual.

The Startup Group and Startup Folder

Under Windows 3.x and Windows NT 3.x, the Startup group enables you to start programs automatically as soon as Windows starts. The Startup group is no different from any other program group. Windows and Windows NT simply look for a group by that name and execute any programs in it during startup.

Windows 95 and Windows NT 4.0 systems use something very similar--a Startup folder. The Startup folder is like every other folder (directory) on your system, except that it is named Startup. These operating systems look for the Startup folder in the \Windows\Start Menu\Programs folder by default.

In short, you can place any executable object (program, shortcut, and so on) in the Startup group or folder and it executes automatically as soon as Windows starts. Here's the important part: To bypass the Startup folder or group, hold down the Shift key while Windows is starting, and keep holding it down until you see the desktop appear. Why would you want to bypass Startup? An application in the group or folder might be causing problems and locking up your system. After bypassing Startup, you can open the group/folder and remove the offending item.


TIP: In all versions of Windows, Windows 95, and Windows NT, the run= and load= lines in WIN.INI also can start programs automatically at startup. If your Startup group/folder is empty, but programs are still starting anyway, have a peek at WIN.INI.

Editing Startup Files

Except for the Registry, you can edit all of the configuration files with a text editor. In the case of some, like Msdos.sys and Boot.ini, you must first change the attributes of the file so it isn't read-only or hidden.

For DOS systems, the EDIT command works great for editing files. EDIT.COM is located in your DOS directory, and also requires the file QBASIC.EXE be on your system in the DOS directory. At a command prompt, just type EDIT filename, where filename is the name of the configuration file you want to edit. An example is EDIT C:\CONFIG.SYS.

In all versions of Windows, Windows 95, and Windows NT, you can use Notepad to edit configuration files. Or, use the System Editor, a special text editor designed specifically for editing the system configuration files (previously shown in Figure 1.6).

System Editor (SysEdit) displays each of the configuration files in a separate window, which makes it easy to edit multiple files at one time. To start System Editor under Program Manager, choose File, Run, and enter SYSEDIT in the Run dialog box. To start System Editor under Explorer, choose Start, Run, and enter SYSEDIT in the Run dialog box.

Controlling Boot Under DOS

The previous sections that discussed CONFIG.SYS and AUTOEXEC.BAT explained that you can control, to some degree, the boot process on DOS systems by modifying these two files. You also can control the boot process with some function keys.

When the message Starting MS-DOS appears on the display, you can use these function keys to control how the system boots:

MS-DOS 6.x also lets you create a multi-configuration setup in CONFIG.SYS, which effectively lets you create different configurations and select a configuration at boot time. This can be particularly useful if you want to use a certain device only part of the time. When you don't want to use it, you can boot the system and choose a configuration that doesn't include the driver for the device. This leaves the system with more memory, because the memory isn't taken up by the driver.

Another common use for a multi-configuration setup is to run DOS games that conflict with Windows. You can create a configuration just for that game, and boot the system to an appropriate DOS environment to run it. When you're finished with the game, you can reboot the system with the configuration you use to run Windows.

Creating a multiple configuration CONFIG.SYS file isn't difficult, but it does take a little explanation. Rather than cover it here, I'll point you to your DOS manual for an explanation of how to do it.

Controlling Boot Under Windows 95

Like DOS, Windows 95 supports the use of function keys during boot to control boot options. Before the Starting Windows 95 message disappears from the display, you can press one of the following function keys to control the boot process:


TIP: You can press any of these function keys at any time after the PC finishes the POST--you don't have to wait until you see Starting Windows 95.

You read earlier in this chapter about the Windows 95 boot menu. When you press F8 (or add the setting BootMenu=1 to the Msdos.sys file), you'll see the following boot menu appear when Windows 95 starts to boot:


TIP: If your system still contains a copy of DOS, and the setting BootMulti=1 is present in the Msdos.sys file, the boot menu will contain an Option 8 that enables you to boot the system to the previous version of DOS.

Controlling Boot Under Windows NT

As explained earlier in the section "Boot.ini--Windows NT," the settings in the Boot.ini file control the way Windows NT boots. Boot.ini defines the operating systems installed on the computer, which operating system boots by default, and the amount of time the boot menu is displayed before Windows NT boots using the default option. As explained earlier, you should use the System icon in the Control Panel to control the way Windows NT boots.