MS-DOS

MS-DOS is one of the most basic operating systems that we use today. The first version of MSDOS was very primitive, but after a few changes, it provided all the necessary functions an operating system needed. DOS has undergone several changes over the years to provide better functionality. After MS-DOS 5, no major commands were added to the operating system; only compression was enhanced. Table 9.1 shows the different versions of MS-DOS and the main improvements. MS-DOS is a single-tasking operating system, which means that it can run only one program at a time. The MS-DOS user interface is a command-line interface, which means that users must type text-based commands and responses when interacting with the operating system (see Figure 9.1).
Note: MS-DOS commands are not case sensitive, which means that typing in uppercase as opposed to lowercase doesn’t affect the meaning of the command. In this book, MS-DOS commands and file names may appear either in uppercase or in lowercase type.

Files MS-DOS treats each separate program and piece of data as an individual file. Each file has a name, which is broken down into two parts: a file name and an extension. The file name can be up to eight characters long and the extension can be up to three characters long. The file name and extensions can contain any character except / \ [ ] | < > + = ; , * ? because these characters have a special meaning for the operating system. Also, neither the file name nor the extension can contain spaces. The file name and extension are separated by a period. This naming scheme is referred to as the eight-dot-three (8.3) file name limit. Some acceptable MS-DOS file names are
• • • • • •
Autoexec.bat Config.sys My.doc Word.exe Test.txt Command.com

Note the 8.3 file naming convention used above. Table 9.2 shows some examples of file names that are invalid in MS-DOS and explains why. The file name is a simple way of identifying programs and data. Using file names, users can retrieve data and run applications or programs easily. If the computer’s file system did not allow you to use text-based file names, you would have to learn to read binary format (1s and 0s) to access files and interact with the computer.
Note: Communication and computations conducted at the hardware level, specifically within the CPU, are conducted in binary format.

We’ve talked about file names and briefly described the purpose of a file name. We also mentioned the extension. The extension defines the function of a file and associates it with a particular type of program. For example, program files (compiled and executable files) typically end with either .exe or .com. Batch files end with a .bat extension. All other files contain some form of data to support programs. Different programs use different types of data files. The extension shows or defines which program uses the particular data file. A file name that has a .doc extension is associated with Microsoft Word, a word processing program. A file name with

the extension .bas is associated with Basic, a simple programming language and compiler. As mentioned earlier, all files are stored on the hard drive in binary format, but every program has its own way of reading and writing the binary data. Each unique binary organization is referred to as a format; different program types use a different format. As a result, one program cannot interpret another program’s files unless it has a way of converting the format to one that it understands. In the early days of MS-DOS, few programs could interpret the data of other programs. It was very difficult for people to share files and data. A standard was created that let different programs “talk” the same language. This standard is called the American Standard Code for Information Interchange (ASCII, pronounced “as-ski”). The ASCII standard, as we know it today, defines 256 eight-bit characters. The characters include all letters of the alphabet (both uppercase and lowercase), numbers, punctuation, many foreign characters, box-drawing characters, and a series of characters for commands such as carriage return, bell, and end of file (EOF). ASCII files, or text files, store data in ASCII format. ASCII was the first universal file format. Virtually every type of program can read and write in ASCII. Unfortunately, ASCII files are limited. For example, a text file cannot store information like shapes, colors, special text formatting (bold, italics, or underlining), or graphics. Text files are limited to the 256-character set defined by ASCII.

Drives and Directories

Each drive in MS-DOS has a drive letter o Floppies — A and B o Hard drives — begin with C o CD-ROM drive — typically drive letter following last hard drive defined Directory tree organizes the drives’ file structure o Directory o Root directory o Subdirectory o Parent directory o Child directory

Each drive in MS-DOS is assigned a drive letter. The first floppy drive is assigned the drive letter A, the second floppy, if a second floppy drive is installed, is assigned the drive letter B. MS-DOS can support only two floppy drives. Hard drives start with the letter C and can continue to the letter Z. All drive letters are assigned by MS-DOS and cannot be changed. Typically, CD-ROM drives are assigned the drive letter that follows the last hard drive partition defined. MS-DOS uses a hierarchical directory tree to organize floppies and hard drives. These groups are called directories. There are several different types of directories. Some of the different directory terminology is listed in Table 9.3. A directory contains files. When a file is not contained within a directory, it is said to be in a root directory (e.g. C:\). If a directory is contained within another directory, it is called a subdirectory (e.g. C:\DOS). You cannot give two files in the same directory the same name, and you cannot give two subdirectories within the same directory the same name. Directory names follow the same 8.3 naming convention as file names. When describing a drive partition, use the drive letter. For example, the hard drive is represented by C. The root directory is described by C:\. If you wanted to describe a directory named DOCS that was stored in the root directory of the C drive, it would be represented by C:\DOCS. The pattern continues with subdirectories. The exact location of a file is called a path.

MS-DOS Structure Primary MS-DOS files
• • •
Io.sys BIOS communications Hidden file Msdos.sys o Primary MS-DOS code “Kernel” o Hidden file Command.com o Command interpreter for user interface o Not hidden

o o

The MS-DOS operating system is stored on the primary MS-DOS partition. The hardware BIOS program looks for this partition during the boot procedure. (Actually, the BIOS looks for the Active partition as defined by Fdisk, which is covered in more detail in Chapter 10.) Three primary files comprise MS-DOS. Table 9.4 lists these three files and their functions. These three files must be on the active primary partition for the MS-DOS operating system to boot. These three files are not interchangeable between versions of MS-DOS. After the POST phase of the boot procedure, Io.sys and Msdos.sys are loaded and run. Next, Command.com is loaded and run.

System Files Important MS-DOS System Files

Config.sys o Configures the hardware environment Mouse Printer Keyboard o Country codes (time, date, currency) o Other devices and system commands Autoexec.bat o Programs/commands to be run at system start o Batch file (automatically executing set of programs/commands)

The Config.sys and Autoexec.bat files are useful for configuring MS-DOS but are not required. After the command interpreter (Command.com) is loaded, the Config.sys file is parsed, if present. After Config.sys has completed, Autoexec.bat is loaded, if present. Config.sys contains special commands and is responsible for configuring the hardware environment. Memory management is configured in Config.sys, as well as the number of files and buffers available for the operating system. The country code can be configured for the system, which will let the system use country-specific conventions for displaying dates, times, and currency. Generally, commands relating to the mouse, printer, keyboard, and disk drives are also found here. Devices are normally loaded here. Below are some sample commands you’ll find in Config.sys: Device=C:\DOS\Himem.sys Device=C:\DOS\Emm386.exe Stacks=9,256

If present, Autoexec.bat is run after Config.sys. Autoexec.bat is used to customize the user’s environment. Autoexec.bat contains commands that are executed each time the system is restarted. Below are some sample commands you’ll find in Autoexec.bat: Echo Off Cls Prompt=$p$g Batch, executable, and command files can run from a command line in the Autoexec.bat file. These files can be identified by the file extensions as listed in Table 9.5. The rest of the MS-DOS operating system is typically located in a directory with a name similar to MS-DOS, for instance C:\DOS. The files located in this directory provide operating-system utilities, such as the format utility (used to perform a high-level format on floppy disks and hard disks), but aren’t necessary to the normal operation of the system.

MS-DOS User Interface The text-based MS-DOS user interface may seem primitive, but it is actually very fast and powerful. The MS-DOS interface is geared around the prompt, which is a path followed by a greater than (>) sign. When you see the prompt (Figure 9.2), you know MS-DOS is ready to accept your commands.
MS-DOS is always focused on a directory, and the prompt shows you which directory you are focused on. Any commands you issue are performed on that directory. For example, if you are focused on the C:\DOS directory, you know that commands will be carried out in the MS-DOS directory. You need to know how to get MS-DOS to focus on the directory that you want to work from. Several commands can assist you with this task.
Dir (Directory)

The Dir command displays a list of the files and subdirectories that are in the directory you specify. As you can see in Figure 9.3, when you use Dir without parameters or switches, it displays the disk’s volume label and serial number; one directory or file name per line, including the file name extension, the file size in bytes, and the date and time the file was last modified; and the total number of files listed, their cumulative size, and the free space (in bytes) remaining on the disk. The syntax for the Dir command is

Dir [drive][path][file name] [/p] [/w] [/a[[:]attributes]] [/o[[:]sort order]] [/s] [/b] [/l] [/c]
Parameters

[drive][path] — Specifies the drive and directory for which you want to see a listing. [file name] — Specifies a particular file or group of files for which you want to see a listing.
Switches

/p — Displays one screen of the listing at a time. To see the next screen, you press any key. /w — Displays the listing in wide format, with as many as five file names or directory names on each line (Figure 9.4). /a[[:] attributes] — Displays only the names of those directories and files with the attributes you specify. There are four types of file attributes: R (Read-only), S (System), H (Hidden), and A (Archive).

• • • •

Read-only files cannot be overwritten. System files are used by the operating system. Hidden files are not visible when a Dir command is issued. Archive is the default file type and essentially indicates the file has been saved to disk. (Note that the Attrib command can also be used to view and change file attributes. For more information, type Attrib /? at the command prompt.)

/o[[:] sort order] — Controls the order in which Dir sorts and displays directory names and file names. /s — Lists every occurrence, in the specified directory and all subdirectories, of the specified file name. /b — Lists each directory name or file name, one per line (including the file name extension). This switch displays no heading information and no summary. The /b switch overrides the /w switch. /l — Displays unsorted directory names and file names in lowercase. This switch does not convert extended characters to lowercase. /c[H] — Displays the compression ratio of files compressed using DoubleSpace or DriveSpace, based on an 8K cluster size.
Chdir or Cd (Change Directory)

The Chdir or Cd command displays the name of the current directory or changes the current directory. The syntax for the command is Chdir [drive:][path] Chdir[..] Cd [drive:][path] Cd[..] To display the current drive letter and directory name, use either of the following: Chdir Cd
Parameters

[drive:][path] — Specifies the drive (if other than the current drive) and directory to which you want to change (Figure 9.5). .. — Specifies that you want to change to the parent directory. To change from a subdirectory to the parent directory, type Cd..
Mkdir or Md (Make Directory)

The Mkdir or Md command creates a directory. You can use the Mkdir or Md command to create a multilevel directory structure. The syntax is Mkdir [drive:]path Md [drive:]path
Parameters

[drive:] — Specifies the drive on which you want to create the new directory. path — Specifies the name and location of the new directory. The maximum length of any single path from the root directory to the new directory is 63 characters, including backslashes (\) (Figure 9.6).
Rmdir or Rd (Remove Directory)

The Rmdir or Rd command deletes (removes) a directory. Before you can delete a directory, you must delete its files and subdirectories. The directory must be empty except for the . and .. symbols. The syntax for this command is

Rmdir [drive:]path Rd [drive:]path
Parameter

[drive:]path — Specifies the location and name of the directory you want to delete (Figure 9.7).

WINDOWS 3.x
WINDOWS 3.x The Windows 3.x family of operating systems provides a nice graphical user interface (GUI) instead of the text-based interface of MS-DOS. With the Windows 3.x GUI, you see icons that represent all your programs, file directories, and some commands. You can also use a mouse to navigate your directories and files. One of the biggest misconceptions about GUIs is that they are the operating system. This is simply not true. A GUI does nothing more than translate the manipulation of icons into commands that are understandable to the operating system. The GUI interface provided by the family of Windows 3.x still needs to run on top of MS-DOS. Therefore, MS-DOS is the primary operating system and Windows 3.x provides the GUI. When you boot your computer, MS-DOS must be loaded first, then you start Windows by typing Win. Once the GUI interface is started, you see the foundation of Windows 3.x — the Program Manager.

Windows 3.x Evolution Windows 3.x has evolved over the years to take advantage of the newer technologies available, allowing Windows 3.x to operate in different modes that match the latest Intel CPU modes.
Real Mode

Windows 3.x started out as nothing more than a GUI for MS-DOS. The first version of Windows did not have any memory management functions and was not capable of multitasking. It was merely for starting applications and managing files. This version ran in the MS-DOS limit of 1 MB of RAM.
Standard Mode

Standard mode — running in a 286-level protected mode — gave Windows the ability to address up to 16 MB of RAM. This ability caused problems with programs that ran in MS-DOS’s real mode. Windows could support standardized graphics, fonts, I/O devices, and memory mappings.
386 Enhanced Mode

Windows in 386 enhanced (protected) mode addresses up to 4 GB of memory, supports virtual memory, and lets multiple MS-DOS programs run simultaneously.

Windows Structure The Windows 3.x core consists of the six primary files outlined in Table 9.6. Additional components of the Windows 3.x structure include swap files and initialization files.
Swap Files

A swap file is virtual memory, which is an advanced function of 386 protected mode that lets the CPU allow a portion of the hard drive to act like RAM. It is much slower than RAM but allows systems with limited RAM to run more applications. Virtual memory is managed from a special hidden file called 386spart.par, which acts like a temporary storage box to allow Windows to temporarily move active programs out of RAM so other programs can be loaded and run.
Initialization Files

Initialization files are text files that have a .ini extension and are used by Windows to initialize just about everything, including Windows itself, device drivers, and programs. A system typically has a large number of .ini files, but the following files are found on most Windows 3.x machines:

• • • • • •

Control.ini — sets colors, background patterns, printers, and installable drivers. Mouse.ini — controls mouse hardware settings. Program.ini — defines what groups are in the Program Manager and has a number of settings to restrict user access. It also has information such as the location of the program group files and size. Protocol.ini — defines components used in a network environment. System.ini — controls and initializes all the resources for a PC. Controls the system hardware settings and their associated information. Also has the list of drivers for the hardware installed. (Like Config.sys for MS-DOS.) Win.ini — defines user-specific settings for the Windows environment, such as screen savers, colors, fonts, associations, and how resources interact with the applications. (Like Autoexec.bat for MS-DOS.)

WINDOWS 95
WINDOWS 95 Windows 95 is a great enhancement to MS-DOS because you really get two products in one. Windows 95 has a MS-DOS protected-mode interface (DPMI) and a protected-mode GUI. The DPMI mode is an improved version of MS-DOS that supports the use of extended memory but does not multitask. Windows 95 first starts the DPMI, then loads the GUI. You don’t have to use the GUI to boot to Windows 95. This is an important concept because a lot of functions are handled at the C:\ prompt.

DPMI The DPMI still requires the same three files to load that MS-DOS needs: Io.sys, Msdos.sys, and Command.com. However, these files are not the same as they were in previous versions of MSDOS. Their file sizes are different, they support long file names, and the Msdos.sys file is now a text file.
Note: The Msdos.sys text file lets you change startup parameters for Windows 95. One of the optional activities at the end of this chapter gives you a chance to modify the Msdos.sys file.

GUI The GUI is a protected-mode overlay of the DPMI that loads its own device drivers for everything, which means you do not need a Config.sys file to load device drivers. The GUI provides just about everything for Windows 95 that Config.sys provides for MS-DOS. The GUI also loads protected-mode MSCDEX for just about all of the ATAPI-compliant CD-ROM drives and protected-mode mouse support, which makes the Autoexec.bat just about obsolete for Windows 95.
At the lowest levels of the GUI architecture are the real-mode and protected-mode device drivers. Real-mode drivers are those loaded from Config.sys and Autoexec.bat. Protected-mode drivers are those loaded from the GUI. Next comes the virtual memory manager (VMM), which supports memory usage in both DPMI and GUI levels. The differences between the two are that the GUI mode can take advantage of the power of 386 and faster processors, whereas DPMI loads only simple MS-DOS; and the GUI can create virtual machines (VM) – those areas of memory that applications run in. Using multiple VMs allows MS-DOS programs to run in their own memory space, thus improving operating-system performance. Along with the VMM is the installable file system (IFS), which provides support for hard drives, CD-ROM drives, and network drives. The IFS also provides the support for long file names. The IFS supports both the DPMI and GUI mode. In the GUI mode you have the core of Windows 95: the Kernel, GDI, and User. These

components handle all the main functions within Windows 95. Applications use these three main components in much the same way that Windows 3.x applications use them, except the Windows 95 version has some improvements. The first improvement is the 32-bit protected mode that Windows 95 supports; Windows 3.x supports only 16-bit real mode. The second major improvement is that Windows 95 uses pre-emptive multitasking, which means that each program is allocated CPU time, whereas Windows 3.x uses cooperative multitasking, which means that the programs take and release CPU time based on the way the application was written. From a performance perspective, Windows 95’s cooperative multitasking is much more efficient. At the top of the Windows 95 architecture is the desktop or user interface (Figure 9.8) with icons, windows, and toolbars. You can use a couple of different interfaces to interact with your computer in Windows 95: the default shell (Explorer.exe), which provides you with a desktop centered view of the computer (shown in Figure 9.8), and a file manager equivalent, Winfile.exe (shown in Figure 9.9), which gives you an interface similar to the old Windows 3.x File Manager. Other software vendors have also developed their own desktop interfaces for Windows 95. You can launch the Winfile.exe application by clicking Start and Run; then typing Winfile in the Run dialog box; and then pressing the Enter key.

The Registry
• • •
Centralized configuration database o Software settings o Hardware settings Registry files o User.dat and System.dat o Backed up as User.da0 and System.da0 Regedit.exe

Another new feature of Windows 95 is the Registry, which functionally replaces most of the .ini files used in the Windows 3.x environment (System.ini and Window.ini remain for backward compatibility). The biggest problem with Windows 3.x .ini files is they are scattered, and it is very difficult — even for the experienced user — to keep track of them all. The Registry puts all the information in one central location. Another problem with .ini files is there is no standard format; the Registry in Windows 95 is standardized through the use of two binary files called System.dat and User.dat. System.dat stores information about the hardware and software, including network information. User.dat stores information about user-specific settings, such as wallpaper settings. To provide some redundancy and recoverability options, backups of both files are created whenever Windows 95 starts. The backup files are System.da0 and User.da0. You should not directly access the Registry routinely; you should use menus and some installation programs to update it. The main way to access the Registry is through a program group called Control Panel. The only function of the Control Panel is to update the Registry. The Control Panel application lets you modify system settings that automatically update the Windows 95 Registry. When possible, you should always modify system settings through the Control Panel applications, rather than editing the Windows 95 Registry directly. However, sometimes you may have to use the Registry editor (Regedit.exe). Figure 9.10 shows how you might run the Registry Editor from the Run dialog box (Start, Run, and type Regedit).
Note: Be extremely careful when following directions to edit the Windows Registry. Incorrect additions or subtractions to the Registry could crash your system and prevent it from operating properly.

Figure 9.11 shows a Regedit window with the My Computer\HKEY_CURRENT_CONFIG\Software\Fonts subkey displayed. A text editor cannot modify the Registry files (System.dat and User.dat in the Windows directory). You must use a Registry editor (Regedit.exe) to modify the Windows 95 Registry files.
Registry Keys

The Registry is organized hierarchically in a tree structure. There are six main subgroups of keys. Each key has several subkeys underneath it. Each subkey has values associated with it that are the configuration parameters for Windows 95. Table 9.7 lists and describes the six main keys. (Chapter 10 covers the Registry in a little more depth.)

Windows 95/98 File Structure
• • •
Supports Long File Names (LFNs) o 255 characters o multiple dots (.) Spaces are okay Truncated names produced for MS-DOS compatibility

The file structure for Windows 95 is greatly improved over that of Windows 3.x. Windows 95 supports long file names (LFN), overcoming the 8.3 limits. Windows 95 file names can contain up to 255 characters and can also contain spaces and multiple periods. How does someone using an old MS-DOS machine read a file with a long file name that has been used on a Windows 95 machine? When a LFN is saved, the system first creates a short name that fits the 8.3 standard, thus providing backward compatibility with MS-DOS. For example, This is a really really really long file name.txt becomes thisis~1.txt The long file name becomes truncated using the first six characters and adding a tilde (~) and a number, beginning with 1. Each 13-character block of a long file name creates one entry in the file system; therefore, a 27-character file name creates three total entries in the file system. You may see a couple of problems when using LFNs. First, you can have only 512 directory listings in a root directory, so by using a large number of LFNs, you could actually use up all 512 directory entries without using up a lot of disk space. Another problem is that older disk utilities, like Norton Scandisk for Windows 3.1, interprets long file names as disk corruption. Such utilities might try to delete your files, thinking they are corrupt. To avoid this problem, ensure that you are always using the disk utilities written for your operating system.

Desktop Operating System vs. Network Operating System We’ve talked about three different operating systems and their functionality as well as the differences between them. We also need to discuss the traditional desktop operating system and the network operating system.
By definition, a desktop operating system is one that controls a single computer in a nonnetworked environment — it does not use a network to communicate with other computers. Therefore, if users want to share files, they must copy them onto some type of removable medium, such as a floppy disk, and take that medium to another computer. This setup is known as “sneaker net” because the users are walking from computer to computer. A network operating system is the operating system on a personal computer that provides network resources and support to other computers on a network. On a network, files can be

transferred electronically over network connections such as networking cables, light signals, or radio waves. Windows 95 and some versions of Windows 3.x are actually network operating systems. That is, they can function either as a desktop operating system or as a network operating system. Although MS-DOS versions 6.22 and earlier did not have native networking components, Microsoft has created an add-on client for MS-DOS to let it participate on a network. The lines between the desktop and the network are no longer as clear as they were in the early days of MS-DOS.

REVIEW
The OS communicates with the hardware and provides the user interface. It works with the BIOS to provide access to devices such as the hard drive and keyboard. It also provides the user interface by organizing applications so that users can easily access them. Disk Operating System (DOS) was the first real operating system. It is primitive by today’s standards, but it is still powerful enough to provide all the functions needed by an operating system. MS-DOS uses a text-based user interface and a command prompt to give users access applications and files. MS-DOS has an 8.3 limitation for file names: eight characters for the file name and three characters for the extension. The extension of a file name defines the function of a file and associates the file with a particular program type. ASCII is a text-based format that allows different programs to read from and write to other programs. The MS-DOS structure uses three primary files to load the operating system: Io.sys, Msdos.sys, and Command.com. These files must be on the active primary partition. MS-DOS also uses the Config.sys and Autoexec.bat files to configure hardware and run programs. Windows 3.x adds some GUI functionality to MS-DOS. It uses icons to represent files, programs, and directories. Windows 3.x has the same 8.3 file name limits that MS-DOS has. Windows 3.x uses .ini files for configuring the hardware and program groups for accessing programs. The foundation of Windows 3.x is the Program Manager. Windows 95 is an OS that provides both real-mode processing (DPMI) and protected-mode processing (GUI). Windows 95 is not limited by the 8.3 file name convention. The Registry replaces most of the .ini files that Windows 3.x uses and provides a central location for all hardware configurations. The two main ways to modify the Registry are through the Control Panel and with the Registry editor.

VOCABULARY
Before proceeding to the next chapter, review the following terms and definitions.
Term API Application ASCII Definition Application Programming Interface; a standard for applications to interpret data. A program used by a user to access hardware and data. American Standard Code for Information Interchange; a 256-character set that defines the alphabet (both uppercase and lowercase), numbers, punctuation, foreign characters, box-drawing characters, and a series of characters for commands.

Binary BIOS

The primary language that the computer understands. Uses 1s and 0s to store data. Cannot be edited with a text editor. Basic Input/Output System; a chip that permanently stores the portion of the operating system that handles communications between the computer and peripherals. The Complementary Metal-Oxide Semiconductor; a specialized chip that is powered by a small battery located on the motherboard and stores the PC’s hardware configuration information. Part of the file name that defines the type of file and associates the file with a program (e.g., .bat, .doc, .txt). A way of organizing files for easy retrieval. Graphical User Interface; an interface that provides mobility and functionality within the operating system. A graphical representation of directories, files, and objects. Microsoft Disk Operating System; the first OS Microsoft released. It uses a command-like interface. A set of computer programs that provides user interface and interprets commands to access the hardware.

CMOS

Extension File name GUI Icon MS-DOS Operating system

IN BRIEF
If you want to... Check to see which operating system is active Then do this Go to the command prompt and type Ver. It will tell you which operating system is active.

Execute an application Go to the command prompt and type the name of the application program or utility in MS-DOS program or utility and press Enter. Execute an application or utility in Windows 3.1 or Windows 95 View or edit the Autoexec.bat file or Config.sys file in MS-DOS View or edit the .ini files in Windows 3.1 View or edit the Registry in Windows 95 Double-click the icon assigned to the application program or utility.

Use the Edit program; for example, type Edit Autoexec.bat.

Use the Edit program from an MS-DOS command prompt or use Notepad. You can practice using Notepad in Activity 3 in this chapter. Launch Regedit from the Run dialog box.

CHAPTER QUIZ
1.
Which two files make up the Registry in Windows 95? A. Io.sys and Msdos.sys B. Config.sys and Autoexec.bat

C. D.

User.dat and System.dat User.da0 and System.da0

2.

Command.com contains which type of MS-DOS commands? A. External B. Internal C. Real-mode D. Protected-mode

3.

Which file starts automatically when Windows 3.x is started? A. Config.sys B. Setup.ini C. Pif.ini D. Win.ini

4.

Which tool must be used to prepare a hard drive before you can format it? A. Chldsk B. Fisdisk C. Fdisk D. Cleandisk

5.

Which file executes commands in MS-DOS? A. Msdos.sys B. Io.sys C. Config.sys D. Command.com

6.

What utility is used to directly modify the Registry? A. Regedit B. Edit C. Notepad D. .pif

QUIZ ANSWERS
1. 2. 3. 4. 5. 6. C — User.dat and System.dat are the files that make up the Registry. The .da0 file is a backup of the .dat file. B — Command.com uses internal commands that are loaded into memory. D — The Win.ini file starts up automatically when Windows 3.x is booted. Win.ini contains information about the Windows configuration environment. C — Fdisk is the utility that is used to prepare a hard drive for use. It creates the primary partition and sets the active partition needed by the operating system. D — Command.com is the command interpreter for MS-DOS. A — Regedit is the utility that allows you to directly modify the Registry. Control Panel is most commonly used when modifying the Registry.

CROSS REFERENCE
For more information about the subjects covered in this chapter, refer to the following pages and chapters in the books listed below. • • •
Upgrading and Repairing PCs, Eighth Edition, Scott Mueller, Que The Complete PC Upgrade & Maintenance Guide, Eighth Edition, Mark Minasi, Sybex How Computers Work, Deluxe Edition, Ron White, Ziff-Davis

Most of the topics are also covered in earlier editions of the books, but you may have to look in the index for the correct chapters. Also note that newer technology topics are not covered in the earlier versions of these books.
Topic Operating Systems Upgrading and Repairing PCs Pages 873-922 The Complete PC Pages 690-758 How Computers Work N/A

ACTIVITIES
The activities for this chapter show you boot options in the three environments and give you the opportunity to practice navigation skills within these operating systems. You can also practice editing and finding files on your system, creating custom startup messages through the Autoexec.bat file, and modifying the Msdos.sys file in Windows 95.

Activity 1 — Investigating the Dual-Boot Process In this activity, you learn how to use the Windows 95 boot menu to access the various boot options. This menu allows you to boot using different recovery modes. Also, you can use it to boot into MS-DOS.
1. 2. 3. 4. If you are booted into Windows 95, click Start. Choose the Shutdown option. Select Restart the computer, then click Yes. The computer should begin a reboot at this time. Place your finger on the F8 key but don’t press down. As soon as you see the message “Starting Windows 95...” press F8. Doing so should result in the display of the Microsoft Windows 95 Startup Menu. If it doesn’t, you may have missed the small window of opportunity to press F8. Repeat the above steps if that is the case. On the Windows 95 Startup Menu, you should see eight options. Notice that the first option is Normal and the last option is Previous version of MS-DOS. The other options are used for troubleshooting the boot process. For now, use the arrow keys to select the previous version of MS-DOS, then press Enter. Your previous version of MS-DOS should begin loading. Type Ver at the command prompt to confirm that you are in MS-DOS 6.22. To ensure that you can still load Windows 3.x, type the following commands: Cd Win3x Win

5.

6. 7.

Note: You changed to the Windows 3.x installation directory and launched your copy of Windows 3.x. Notice that Windows 3.x is loading and running. You should see the Program Manager and all your Windows 3.x icons.
8. 9. Click File, Exit Windows, then click OK to exit Windows 3.x. To launch Windows 95 again, you can simply reboot your computer or press Ctrl, Alt, and Del simultaneously to “warm boot” your computer.

In this activity, you learned how to boot between the different operating systems installed on your computer. You should now be able to boot to Windows 95 or your previous version of MS-DOS and launch Windows 3.x.

Activity 2 — Creating an Automatic Boot Message Assume that you would like to add a message that will be displayed during the system boot and that users will have to acknowledge. You can do this by editing the Autoexec.bat file and inserting an Echo command. In this activity, you configure such a boot message while learning to edit the Autoexec.bat file.
1. Ensure that your system is booted to MS-DOS 6.22. Be sure to boot into your previous version of MS-DOS (Press F8 when you see “Starting Windows 95...” and select Previous version). Ensure that you are in the root directory (C:). If not, type Cd\ at the command prompt to change to the root directory. You are about to edit the Autoexec.bat file. Before you do, make a backup copy by typing Copy Autoexec.bat Autoexec.sav

2. 3.

4.

at the command prompt. Now, type Dir Autoexec.sav to see that your backup copy has been made. You should see a listing that shows the Autoexec.sav file in the directory structure.

Note: These commands are not case sensitive; you can type them in upper or lower case characters or any combination of characters.

5.

To open the Autoexec.bat file in the editor (Edit.exe), type Edit Autoexec.bat

6.

at the command prompt. You should see the Autoexec.bat file open in the editor. Now, type the following commands at the end of the file: Echo hello! Welcome to MS-DOS 6-22 Pause

Note: To get to the end of the file, use the arrow keys to move the cursor. To insert a line, press Enter at the end of the line above where you would like to start typing.
7. 8. 9. To save the file, press Alt until the word “File” is highlighted at the top left of the screen. Then, use the down arrow and select Save from the drop-down menu. To exit the editor, press Alt until the word “File” is highlighted. Then, use the down arrow to select Exit from the drop-down menu. Press Ctrl, Alt, and Del simultaneously to restart your system. Be sure to boot into your previous version of MS-DOS (Press F8 when you see “Starting Windows 95...” and select Previous version). You should see your message when the system begins to boot. Notice that placing the Pause command in the batch file makes the computer prompt the user to “Press any key to continue...”. To return to the original Autoexec.bat file, change to the root directory (type Cd\). Then, type Ren Autoexec.bat Autoexec.me to rename the file you modified to Autoexec.me.

10.

11. Then, type
Ren Autoexec.sav Autoexec.bat to rename the Autoexec.sav file (the original Autoexec.bat) as Autoexec.bat.

12. Type Dir Autoexec.* to see how many different copies of the Autoexec.bat file are on your system.
Note: The file with a W40 file extension is used by Windows 95, so don’t delete or modify that file.
13. Press Ctrl, Alt, and Del simultaneously to restart your system. Be sure to boot into your previous version of MS-DOS (Press F8 when you see “Starting Windows 95...” and select Previous version). You should see that your message has disappeared because the original Autoexec.bat file is being run.

In this activity, you learned how to configure a custom message to run automatically through Autoexec.bat and you learned to use the MS-DOS editor. You also learned how to back up and restore files before and after editing.

Activity 3 — Using Windows 3.x to View a File In this activity, you use the Notepad.exe application in Windows 3.x to open and view your Autoexec.bat file. The Notepad.exe utility can also be used to modify selected settings in these files.
1.

2.

Ensure that your computer is booted to MS-DOS 6.22. Ensure that you change to the Win3x directory. For example, from the C: prompt, type Cd Win3x

3.
4. 5. 6.

7.

Type Win from the command line and note that Windows 3.x begins to load. Open the Accessories group by double-clicking the icon. Inside you will see the icon for the Notepad application. Double-click the Notepad icon to open Notepad. Then, click File and select Open, which will launch the Open window. In the File name dialog box, you should see that some characters are highlighted in blue. When you type, these characters are automatically replaced with what you type. Type C:\Autoexec.bat

8. 9.

and then press Enter (or click OK) to open the Autoexec.bat file. Notepad is similar to the MS-DOS-based Edit program. To exit, click File and select Exit from the resulting menu. Exit Windows 3.x (File, Exit Windows, OK).

In this activity, you learned to use Notepad in Windows 3.x to access files for editing.

Activity 4 — Modifying the Windows 95 Startup Environment Suppose that you will often need to boot among Windows 95, MS-DOS, and Windows 3.x. Pressing F8 just at the right time during the system startup might become tedious. Instead, you can configure Windows 95 to always bring up the Windows 95 Start Menu during the boot process. To do so, you must edit the Msdos.sys file and add the line BootMenu=1 to the [Options] section.
1. 2. Boot your system into Windows 95. If necessary, log on to the system. By default, Windows 95 hides critical system files from the users. To see critical system files, you must enable the Show All Files option. To do so A. Double-click the My Computer icon. B. Click View. C. Select Options. D. Go to the View tab. E. Click the Show All Files radio button.

F. Click OK. G. Close the My Computer window by clicking the X in the upper right corner of the window. 3. Click Start, highlight Find, then click Files or Folders to open the Find dialog box. 4. In the Named dialog box, type Msdos.sys and press Enter. 5. You will see the Msdos.sys file appear in the window. 6. Right click the Msdos.sys file icon to bring up a context menu. The last option on that menu should be Properties. Select Properties. 7. You should see the Msdos.sys Properties window. At the bottom of the General tab is a section labeled Attributes. Notice that the Read-only box is checked. Because you cannot edit read-only files, you must clear this box (by clicking the check mark). Once that is done, click OK. Now the Msdos.sys file is no longer read-only, and you can make changes to it. 8. In the Find dialog box, double-click the Msdos.sys file icon to bring up the Open With dialog box. 9. Ensure that the “Always use this program to open a file of this type” box is not checked. If it is, uncheck it. 10. Click somewhere inside the “Choose the program you want to use” selection window. Then, press N on your keyboard. If Notepad is highlighted, click OK. If not, use the arrow keys to find Notepad in the list, then click OK to open the Msdos.sys file in the Notepad application. 11. Use the down arrow key to move your cursor one line below the [Options] section. Then, press Enter to create a new line below the [Options] section. 12. Type 13. 14. 15. 16. BootMenu=1 Click File in the upper left of the window. Select Save from the drop-down menu. Click File again and select Exit to exit the Notepad editor. Click Start, click Shutdown, and check “Restart the computer?”. Click Yes. When your computer reboots, you should see the boot menu. To boot into Windows 95, select Normal. To boot into Windows 3.x or MS-DOS, select Previous version of MS-DOS. If you don’t choose anything for 30 seconds, your system automatically boots into Windows 95.

In this activity, you learned to modify the Windows 95 Msdos.sys file to activate the boot menu. You also learned how to change file attributes and to cause Windows 95 to display hidden files.

Sign up to vote on this title
UsefulNot useful