Previous ChapterNext ChapterTable of Contents

- Hour 14 -

Activate DOS-Based Applications

Don't believe the media...MS-DOS is not dead! As a matter of fact, Windows 95 empowers MS-DOS applications more than any version of Windows has to date. Not all programs that you run are written for Windows 95 or even for a previous version of Windows. In the past, Windows did not always provide the support that these MS-DOS programs required. Sometimes you would need to exit Windows completely to run an MS-DOS program.

Virtually every MS-DOS program will run under Windows 95, including many games that were previously off limits to Windows. In addition to handling memory problems that previously plagued MS-DOS programs running inside the Windows environment, Windows 95 provides modern MS-DOS features that will make you think you're running a new version of MS-DOS.

The highlights of this hour include:

MS-DOS and Windows 95

If you want to run an MS-DOS program inside Windows 95, you don't have to start MS-DOS first. You can run the program from the Run command on the Start menu (as long as you know the program's path and filename), or you can add the program to one of the Start menu's cascaded menus and click on the program description or program icon.

If you want to load the MS-DOS environment, Windows 95 provides an MS-DOS icon on the Start menu's Programs group. If you click on the MS-DOS icon, the MS-DOS environment runs in a maximized or smaller window (depending on the settings in the Settings | Taskbar properties dialog box).

3.1 Step Up In almost every case, Windows 95 provides more free memory for the MS-DOS environment than did previous versions of Windows.


TIME SAVER: You may start one or more MS-DOS windows! As a result, you can run several MS-DOS programs at one time, and each will run multitasked inside its own window.

Windows Minute

Environment Control

In the Windows 95 Shut Down command's dialog box, there is no command to exit Windows 95. In previous versions of Windows, MS-DOS would be the controlling environment for Windows; Windows 95 is the controlling environment for MS-DOS.

The Shut Down dialog box does provide an option that lets you shut down Windows 95 and start a windowless MS-DOS environment. You would want to enter the MS-DOS environment after shutting down Windows 95, and only when you find one of those rare
MS-DOS programs that refuses to run under Windows 95.


Task 14.1: Starting an MS-DOS Window


Step 1: Description

This task shows you how to enter the MS-DOS environment from Windows 95. MS-DOS is simply another application to Windows 95, so starting MS-DOS requires no special skills. The MS-DOS environment is known as the MS-DOS prompt in Windows 95 because the MS-DOS prompt collects keystrokes as you type them in an MS-DOS window.


JUST A MINUTE: The MS-DOS window is sometimes called a windowed MS-DOS VM, which stands for Virtual Machine. Each MS-DOS window acts as if that window contains a separate PC that does not interfere with other MS-DOS VM windows.

Step 2: Action

1. Open the Start menu.

2.
Select Programs.

3.
Click on the MS-DOS Prompt icon. The MS-DOS window opens as shown in Figure 14.1. Notice that the MS-DOS window contains a toolbar of icon buttons at the top of the window. Previous versions of Windows did not provide a toolbar for MS-DOS windows.


Figure 14.1. The MS-DOS window acts like any other window in Windows 95.


JUST A MINUTE: Your MS-DOS window may appear fully maximized or resized differently from the figure's MS-DOS window.
4. You can maximize MS-DOS windows. Click the maximize button (or double-click the title bar) to produce the maximized MS-DOS window.


JUST A MINUTE: Although the keystroke is not obvious, you can increase the MS-DOS window to full-screen size by pressing Alt+Enter.
When you increase the MS-DOS window size to full-screen by double-clicking the title bar (or by pressing the Ctrl+Enter shortcut key), the MS-DOS window toolbar disappears.

5.
Press Alt+Enter to resize the MS-DOS window.

6.
Start yet another MS-DOS window by clicking the MS-DOS prompt's icon on the Programs menu.

7.
Start one more MS-DOS window. Previous versions of Windows produced several problems when you opened multiple windows, and you could not properly multitask the MS-DOS windows. Figure 14.2 shows three MS-DOS windows open at one time.


Figure 14.2. Multiple MS-DOS windows can be open at one time.


8.
To close an MS-DOS window, you can click the close button in the upper-right corner (unless the MS-DOS window is maximized, whereby you will see no sizing buttons). You also can type EXIT at the MS-DOS command prompt. You can type the EXIT command using either uppercase or lowercase letters. Close two of the open MS-DOS windows now.


Step 3: Review

The MS-DOS command prompt icon on the Programs menu opens the windowed MS-DOS environment. From the MS-DOS command prompt, you can start MS-DOS programs or issue MS-DOS commands. This task left your Windows 95 environment with one open MS-DOS window. The next task lets you practice using the MS-DOS toolbar at the top of that window.


Task 14.2. The MS-DOS Toolbar


Step 1: Description
This task describes how to use the toolbar that appears on MS-DOS windows. Figure 14.3 shows the toolbar. Previous versions of Windows contained no toolbar. Remember that the toolbar appears only on non-maximized MS-DOS windows. The toolbar is optional, so you can remove the toolbar if you do not want to see it at the top of MS-DOS windows.

Figure 14.3. The toolbar adds functionality to the MS-DOS window.


Step 2: Action

1. Click the Font size dropdown listbox button (at the far left of the toolbar) to display a scrollable list of font sizes. The values determine the size, in points, of the text characters on the MS-DOS window. The Auto sizes lets Windows 95 determine the best size of the characters and MS-DOS window. If you select a different font size, the characters inside the window, as well as the window itself, resize to display the new character point size. If the text inside the MS-DOS window is too small to read, you might want to select a larger point size. When you change the font size, Windows 95 resizes the MS-DOS window to show that font more accurately. You can resize MS-DOS windows, but Windows 95 limits the
    MS-DOS window size to one or two or three sizes, depending on the font size you select.


JUST A MINUTE: The double letter T next to a font size indicates that the font is a True Type font. True Type fonts are generally more readable than non-True Type fonts.
2. The Mark tool on the toolbar lets you mark a section of the MS-DOS window to copy to the Windows 95 Clipboard.


CAUTION: You can copy MS-DOS data to the Clipboard or paste from the Clipboard. You cannot cut data from the MS-DOS window.
Issue the DIR command, (for directory) at the MS-DOS command prompt to display a directory listing. Once you see the directory listing, click the Mark toolbar button. With your mouse, drag from a point on the MS-DOS window down to a second point creating a highlighted inverted square, such as the highlighted section of the MS-DOS window shown in Figure 14.4.


Figure 14.4. The highlighted portion of the MS-DOS window is marked for copying.


3.1 Step Up The Windows 95 version of MS-DOS commands are updated to reflect the new Windows 95 environment. The DIR command works in Windows 95 just as it did in previous versions of Windows and MS-DOS, except you'll see a new column to the right of the listing that contains long filenames for the files in the listing.

Windows 95 uses the same internal file structure as previous versions of Windows; when you create a long filename, Windows 95 automatically converts that filename to a unique name that fits within the older naming convention of eight characters with a three-character extension. The DIR command lets you see both the real internal filename and the long filename that you see in Windows 95 dialog boxes.

Another MS-DOS command that you may want to use with long filenames is the COPY command. The following COPY command would never have worked with previous versions of Windows due to the long filenames:

COPY "My August sales report" "Old report"

(The quotation marks are required when using long filenames that contain embedded spaces.) This command copies the file named My August sales report to a file named Old report so that, at the completion of the copy, two identical files will exist on your computer.

3. Click the Copy toolbar button to send the highlighted MS-DOS data to the Windows 95 Clipboard. As soon as Windows 95 copies the data to the Clipboard, the highlight goes away.

4.
To prove that you copied the data to the Clipboard, start WordPad and select Edit | Paste. The text you highlighted inside the MS-DOS window now appears inside the WordPad window. Terminate WordPad without saving the file.


JUST A MINUTE: The font used inside the default MS-DOS window is a non-proportional font. Therefore, all character columns in the MS-DOS window consume the same width and all align properly into columns of data. Your WordPad's default font might be set up as a proportional font so the data, when pasted into WordPad, may not align in perfect columns as the data does when shown in the MS-DOS window. If you paste MS-DOS data into a word processor and the data does not align correctly, change the font of the pasted data to a non-proportional font such as Courier.
5. Although you pasted the marked text into WordPad and closed the WordPad application, the data still resides on the Windows 95 Clipboard. To see that, click the Paste toolbar button. Windows 95 pastes the text into the MS-DOS window at the cursor's location.

The MS-DOS command prompt requires specific commands and the data you are pasting probably does not fit within the normal MS-DOS command requirements. Therefore, MS-DOS may issue error messages as the data gets pasted back into the window, but you can safely ignore these messages.

6.
Click on the Full screen toolbar button to maximize the MS-DOS window to full screen. Issue the DIR command again. A maximized MS-DOS window produces readable text, although the toolbar and Windows 95 taskbar go away until you resize the MS-DOS window once again.

Press Alt+Enter to resize the MS-DOS window to a non-maximized size.

7.
Click the Properties toolbar button to display the MS-DOS Prompt Properties tabbed dialog box shown in Figure 14.5.


Figure 14.5. The MS-DOS Prompt Properties dialog box controls the way MS-DOS starts and performs.


The MS-DOS Prompt Properties tabbed dialog box contains several settings that control the way your MS-DOS windows appear and perform. For example, if you press a shortcut key, such as D, at the Shortcut key prompt, you will be able to start the MS-DOS window by pressing Ctrl+Alt+D from almost anywhere within the Windows 95 environment.

The Run prompt determines how you want the MS-DOS window to appear when you run programs within the window. The dropdown listbox contains these three window size prompts: Normal window, Minimized, and Maximized.

If you want the MS-DOS window to close when an MS-DOS application finishes, make sure that the Close on exit option is checked. Most of the time, you'll want to leave this option checked.


TIME SAVER: Actually, most of the time you'll want to leave most of the MS-DOS Prompt Properties tabbed dialog box settings alone. The default settings almost always make MS-DOS windows perform the way you want them to.
8. Clicking the Change Icon command button produces the interesting horizontally scrolling dialog box shown in Figure 14.6. If you want a different icon to appear next to the MS-DOS taskbar when running MS-DOS programs, select a different icon from the scrolling list of icons and click OK.


Figure 14.6. You can change the icon that appears on the taskbar for an MS-DOS window.


9.
The remaining tabbed dialog box options are fairly advanced and are usually set to appropriate values. There are a couple you should know about now, however.
Click the Screen tab to display a dialog box that controls the way the MS-DOS screen appears to the user. Figure 14.7 shows this dialog box.


Figure 14.7. The screen options determine how Windows 95 displays the MS-DOS window.


If you uncheck the Display toolbar option, Windows 95 does not display the toolbar in the MS-DOS window. If you want the MS-DOS window to appear maximized when Windows 95 first displays the window (you can still resize the maximized window by pressing Alt+Enter), select the Full-screen option.


TIME SAVER: Although you lose some MS-DOS functionality when you remove the toolbar, you gain extra MS-DOS window space that would otherwise be taken up by the toolbar.
10. Click the Misc tab to see another dialog box that controls several miscellaneous MS-DOS window options. You can control whether or not the Windows 95 screen saver is active during the MS-DOS session. Some MS-DOS programs make the Windows 95 screen saver program think that no keyboard action has taken place and will trigger the Windows 95 screen saver, even when you are actively working inside the MS-DOS mode.

You can see how to determine which Windows 95 shortcut keys are active inside MS-DOS. By default, all Windows 95 shortcut keys are active inside the MS-DOS window, and you should not change these without good reason.

Close the tabbed dialog box now that you've reviewed the highlights of the MS-DOS properties.

3.1 Step Up The MS-DOS Command Properties dialog box replaces the need for PIF and many .INI file tweakings that were the bane of Windows 3.1.

11. The Background toolbar button, when clicked, makes your MS-DOS window run in the background, and when clicked again, makes your MS-DOS program run in the foreground. When in the foreground, the MS-DOS program maintains complete control of the computer, and other windows do not multitask at the same time that MS-DOS is running. You would only click the background toolbar button if you had a clock-sensitive MS-DOS application that required heavy system resources.

Click on the Font toolbar button to display the Font dialog box from the MS-DOS Command Prompt. Figure 14.8 shows this dialog box that appears when you click the Font button. The Font dialog box lets you control the size and format of the font used inside the MS-DOS window. (The Font size dropdown listbox discussed earlier controls only the font size, but not the format.)


Figure 14.8. The Font dialog box lets you control the way characters appear inside the MS-DOS window.


Click the OK command button to get rid of the dialog box. Leave the MS-DOS window open for the next section.


Step 3: Review

The MS-DOS toolbar gives you one-button access to common MS-DOS tasks. You can mark, copy, and paste to and from the Windows 95 Clipboard. You can adjust the screen size and the MS-DOS mode properties so that the MS-DOS session behaves differently. In addition, if you want to use a different font size inside the MS-DOS session, look no further than the help you need to adjust the display font.


CAUTION: Although you will only rarely find such programs, some older MS-DOS programs and very advanced MS-DOS--based games, will refuse to run if the program detects Windows 95 running. You can fool these programs into running anyway by right-clicking over their Explorer icon, selecting Properties from the pop-up menu, clicking the Program tab, and clicking the option labeled Suggest MS-DOS mode as necessary. Although the program may still refuse to run because of a memory conflict, most problems will clear up and the program will execute even though Windows 95 is also running.

Wrapping Up the MS-DOS Window

Over time, you'll run across several items in the MS-DOS window that you'll find interesting. Here's something fun you can try: Open the Windows 95 Explorer program and resize the window so you can see both the Explorer window and the MS-DOS window. Find a filename in the Explorer's right window and drag that filename to the MS-DOS prompt. As soon as you release the mouse button, the filename, including its complete drive and pathname, appears at the MS-DOS prompt!

When managing files in the MS-DOS environment, you can drag filenames from Explorer and other Windows 95 Open dialog boxes instead of typing the complete disk, path, and filename. When working inside MS-DOS windows, you can drag the file from the Windows 95 environment, and Windows 95 substitutes the file name at the cursor. Therefore, if you were in the middle of a COPY command, you could drag filenames, from Explorer, to complete the COPY command instead of typing the names.

In addition, Windows 95 has changed the CD command (Change Directory). As you may know, the following command moves you up one parent directory level:

cd ..

If you are buried deep within several levels of directories while in an MS-DOS session, you can add an extra period to the CD command for each directory you want to return to. The following command returns you to three previous parent directory levels:

CD ....

As always, the following command takes you to the root directory no matter how many directory levels are reside in:

cd \


Windows Minute

Starting Programs in MS-DOS

The MS-DOS window is so fully integrated into Windows 95 that you can execute
Windows 95 programs from the MS-DOS prompt. Therefore, if you know the filename of a Windows 95 program, you will not have to return to Windows 95, if you're working inside a MS-DOS window, to execute a Windows 95 program.

Although Notepad makes an MS-DOS editor redundant and unnecessary, MS-DOS has supplied a text editor since version 1.0 of MS-DOS. There are many MS-DOS die-hards who still want to edit text files from within the MS-DOS environment.

When the Microsoft programmers wrote Windows 95, they decided to update an old stand-by program, the MS-DOS text editor, to implement the long filenames and to modernize the performance of the program. If you have used an MS-DOS text editor, such as EDIT, you'll feel right at home with the updated version of EDIT (its screen is shown in Figure 14.9).


JUST A MINUTE: This hour does not explain EDIT because the Windows 95 Notepad program replaces EDIT. Notepad, which is explained in Hour 10, "Compose Using Writing Tools," is a Windows 95 program that makes the MS-DOS editor obsolete, except to those who already prefer the
older editor.


Figure 14.9. The Windows 95 text editor, EDIT, supports long filenames and an improved keyboard interface.

If you want to start MS-DOS in a specific directory, display the MS-DOS Properties dialog box (by clicking the Properties MS-DOS toolbar button); then type the directory's path-name at the option labeled Working.

3.1 Step Up If you use DOSKEY (the program that lets you more easily edit past MS-DOS commands), you can make Windows 95 automatically run the DOSKEY program by entering DOSKEY at the Program dialog box's (located inside the Properties dialog box) Batch File prompt.

In some cases, an MS-DOS program will refuse to run if you are running a Windows 95 screen saver. Follow these steps to allow the screen saver to work along with such a program:

1. Open Explorer.

2.
Locate the MS-DOS program's icon.

3.
Right-click over the icon.

4.
Select Properties from the icon's menu.

5.
Click the Misc tab to display the Misc dialog box shown in Figure 14.10.

6.
Click the option labeled Allow screen saver.

7.
Close the dialog box. The program should now let the screen saver work in conjunction with the MS-DOS program.


Figure 14.10. Letting a screen saver work with an MS-DOS program.


CAUTION: If the screen saver messes things up, uncheck the option described in the previous steps so that the screen saver goes idle whenever that particular MS-DOS program runs.

Summary

This hour focused on the MS-DOS environment inside Windows 95. Although
Windows 95 users often work far from the MS-DOS text-based environment of olden days, the MS-DOS environment is still alive and well due to the many programs still in use today that are written for MS-DOS.

Windows 95 supports MS-DOS programs better than any version of Windows has so far. Windows 95 provides more memory for programs, as well as enabling you to open several multitasking MS-DOS programs at one time. In addition, Windows 95 adds a toolbar to MS-DOS windows that makes the management of your MS-DOS windows and programs much easier to work with.

There are people who will work many hours a day with Windows 95 and never need to start the MS-DOS environment. Others still use older MS-DOS programs and current-day games that run only under MS-DOS. Because of the extra memory and runtime support provided by Windows 95, these MS-DOS programs ought to work comfortably inside Windows 95.

Workshop

Term Review

default drive and directory When you start MS-DOS, the MS-DOS command prompt always contains a disk drive and directory. The disk drive is normally C, and the directory is the root directory called \ ( backslash). You can change the default disk or directory by entering a new one at the command prompt.

MS-DOS command prompt When you open an MS-DOS window, you must issue a command to the MS-DOS environment. The command prompt, usually shown on the screen as C:\> indicating the current default drive and directory, accepts your MS-DOS commands as you type the commands.

MS-DOS program A program written specifically for the MS-DOS environment. MS-DOS programs do not take advantage of the graphical nature of Windows 95.

non-proportional font A font that contains characters that each consume the same width on the screen or printer.

proportional font A font that generally makes for a more natural appearance of text. The letters within the text do not all consume the same screen width. For example, the lowercase letter i consumes less space than the uppercase M.

True Type font A readable font that appears the same on both the screen and printer.

VM Stands for virtual memory and refers to the concept that each MS-DOS window acts like a separate PC that has access to full memory and other system resources.

Q&A

Q Why would I want to shut Windows 95 down to the MS-DOS environment?
A There are still a handful of rare programs written for the MS-DOS environment that will not run under Windows 95. Microsoft wrote Windows 95 to run most MS-DOS programs, even the ones that previous versions of Windows could not handle. Although the majority of MS-DOS programs work well under Windows 95, the few that do not will run as long as you shut down Windows 95 and restart (via the Shut Down menu command) your computer in the MS-DOS mode.

Q When would I want to start more than one MS-DOS window?

A If you want to run two or more MS-DOS programs at once, such as two games, whether or not you are also running Windows 95 programs, the multiple MS-DOS windows let both of the MS-DOS programs work in a multitasking mode. Each window works independently of the other(s).

Q Why would I execute a Windows 95 program from the MS-DOS prompt?

A Users of previous Windows versions found that they often wanted to execute a Windows program from the MS-DOS prompt but, until Windows 95, they were unable to do that. Perhaps you like to use an MS-DOS bookkeeping system and you suddenly want to use a calculator. If you know the Windows 95 calculator's filename, CALC (with the extension .EXE), you can type that filename (precede the filename with the file's disk name and pathname), such as typing c:\windows\calc, and the program starts immediately (your MS-DOS window still remains open as well).

Q If I like the Windows 95 Notepad program, is there any need to learn the
MS-DOS editor?

A Not really. The MS-DOS editor might be good to use if you're already familiar with previous versions of MS-DOS editors such as MS-DOS 5 and 6's EDIT program. You'll find that Microsoft implemented needed changes to EDIT without changing the fundamental purpose of the MS-DOS text editor.

Previous ChapterNext ChapterTable of Contents