
Like Windows 95 before it, Windows 98 does not retain the concept of the Windows environment running on top of the DOS operating system. Until the advent of Windows 95, you couldn't have Windows if you didn't have DOS. Windows 3.x was basically DOS wearing a nicer, more colorful interface; DOS was the necessary operating system--no two ways about it.
With Windows 95, and now with Windows 98, you get the capabilities of DOS within Windows. Windows 98 is an operating system--separate and distinct--in its own right and does not need DOS. The core functions of DOS, however, still exist in Windows 98. Windows 98 provides better support for DOS applications than any previous Windows versions and adds greater functionality to the DOS command line, which remains part of Windows 98. This chapter explores DOS issues related to Windows 98, including running applications and the DOS command line.
The chapter covers the following topics:
Windows 98 supports DOS applications by providing numerous options for running the application and configuring the application's run-time environment. Among the options you can specify for your application is the name of a batch file that runs just before your application, which might set up some environment variables. You also can specify the amount of extended, expanded, conventional, and protected-mode memory to allocate to the application and more. You can use the property sheet for the shortcut to the application to view and change the options. The settings are stored in the application's PIF file, which Windows 98 automatically associates with the application. To view the properties for a DOS program, right-click on the DOS application's icon and choose Properties from the Context menu. This section presents each of the options on the six property pages.
The General property page (see Figure 17.1) provides information about the shortcut to the DOS application and the PIF file shortcut references.
FIGURE 17.1 The General property page for a DOS application.
NOTE: Some of the information you see in the application's property sheet varies depending on how you have set up the application. If you are looking at the properties for the executable file, the properties apply to that file. If instead you right-click on a shortcut to the application, some of the information in the property sheet--such as file creation date--applies not to the executable file but to the PIF file associated with the executable file.
The information and options presented in the General property page are explained in the following list:
The Program property page (see Figure 17.2) enables you to specify the basic information for the DOS application, such as the name of the file that starts the application. You can choose the Advanced button if you want to customize the environment in which the DOS application runs, and you can choose the Change Icon if you want to specify a different icon for the application (or shortcut). These options are covered individually in the section "Advanced DOS Application Options" later in this chapter.
FIGURE 17.2 The Program property page for a DOS application.
The following list explains the settings in the Program property page:
NOTE: The Batch file text box enables you to specify a batch file that executes just before the system launches the DOS application. If you run a DOS application in MS-DOS mode, however, you can specify CONFIG.SYS and AUTOEXEC.BAT settings for the DOS application to use. For information about MS-DOS mode, see the following section, "Advanced DOS Application Options."
DOS applications are among the most sensitive to their runtime environment, so running a DOS application in Windows 3.x is not always easy. In fact you have no guarantee that a DOS application can run smoothly on a PC even under DOS. In Windows 98, in addition to the settings on the six property pages described in this section, you can use a set of options designed to help you run the most finicky DOS applications. You access these options by choosing the Advanced button on the Program property page, which displays the Advanced Program Settings dialog box shown in Figure 17.3.
FIGURE 17.3 The Advanced Program Settings dialog box enables you to set runtime options for sensitive DOS applications.
Many DOS applications run normally in Windows 98 as long as you choose the correct options from the six standard property pages. When you have more sensitive DOS applications, the options in the Advanced Program Settings enable you to specify more stringent runtime options, further isolating the DOS application from Windows 98. One such option is using the setting that controls whether DOS detects Windows. To prevent possible problems related to running their application under Windows, some DOS applications developers code their applications to detect Windows at runtime. If the application detects Windows, it doesn't run. Windows 98 overcomes this problem by providing a switch that prevents DOS applications from detecting Windows at runtime. If you choose the Prevent MS-DOS-based programs from detecting Windows option, MS-DOS-based applications cannot detect Windows.
The most sensitive DOS applications necessitate use of Windows 98's MS-DOS mode. If you run an application in MS-DOS mode, Windows 98 disappears from memory, except for a small anchor point that enables Windows 98 to return after the DOS application closes. You can specify for Windows 98 to let you know whether it thinks MS-DOS mode would benefit the DOS application. Unfortunately, this setting applies to individual applications; you must enable the Suggest MS-DOS mode as necessary option for each DOS application for which you want Windows 98 to make its recommendation concerning MS-DOS mode. The following section discusses the different options you can specify for MS-DOS mode.
To run an application in MS-DOS mode, you must enable the MS-DOS mode check box in the Advanced Program Settings dialog box. Checking this box activates the other MS-DOS mode options in the dialog box and deactivates the options to detect Windows and suggest MS-DOS mode. The reverse happens when you clear the MS-DOS mode check box. You can customize the DOS environment for the application with the options in the MS-DOS mode group. Keep in mind that the settings you specify here override any other comparable settings in the system. The following are the MS-DOS mode options you can specify:
TIP: In the Windows folder are two sample PIFs for running DOS games using MS-DOS mode. The names of both PIFs begin with "MS-DOS Mode for Games." You can use these PIFs as a basis for customizing the way the game runs. Copy the appropriate PIF from the Windows folder to the folder containing the DOS game; then rename the newly copied PIF so its name matches the name of the application's executable file. Then right-click on either the PIF or the application and fine-tune the MS-DOS mode configuration settings as needed.
More MS-DOS mode options become available when you choose the Configuration button, which activates the Select MS-DOS Configuration Options dialog box (see Figure 17.4). These options use the virtual device drivers described earlier in this chapter.
FIGURE 17.4 The Select MS-DOS Configuration Options dialog box.
The following list describes the options you can specify in the Select MS-DOS Configuration Options dialog box.
You can specify the icon that appears for the shortcut to the DOS application. Select the icon from the Change Icon dialog box (see Figure 17.5), which appears after you choose the Change Icon button on the Program property page.
FIGURE 17.5 You can use the Change Icon dialog box to specify an icon for the shortcut to the DOS application.
The icons that appear in the Current icon list box are those available from the PIFMGR.DLL file, which controls all the property pages. You can select one of the icons that appears in the list box, or you can choose an icon from another file. To choose an icon from another file, type the name of the file in the File Name text box and choose OK. Icons typically are stored in dynamic link library (DLL), EXE, and ICO files. If you need help selecting a file, choose Browse to display the standard file selection dialog box in Windows 98. After you select a file and choose Open, any icons stored in that file appear in the Change Icon dialog box. Windows 98 informs you whether the file you select stores no icons.
The Font property page (see Figure 17.6) enables you to specify font settings for the DOS application and to preview how the fonts appear. The options are valid only when the application is running in a window; they have no effect when the application runs in full-screen mode. You can specify a bitmap or TrueType font, or both, depending on the size you select. You also can select the size of the font from the property page. Two windows on the property page (Window preview and Font preview) preview for you the font type and size selections you make. If you select Auto in the Font size list box, Windows 98 automatically resizes the contents to display the entire window based on how you size the screen.
FIGURE 17.6 The Font property page for a DOS application.
The Memory property page (see Figure 17.7) provides you with numerous options to configure the memory environment for the DOS application. You can specify the amount of conventional, expanded, extended, and protected-mode memory available to the DOS application when it runs.
FIGURE 17.7 The Memory property page for a DOS application.
The following list explains the options in the Memory property page:
FIGURE 17.8 The Screen property page for a shortcut to a DOS application.
The following list explains the options in the Screen property page:
The Misc property page (see Figure 17.9) contains eight options that enable you to apply the finishing touches to your customized DOS application and environment for running in Windows 98. The options on this property page range from dictating Windows 98's sensitivity to inactivity in the DOS application to reserving special shortcut key combinations for Windows 98.
FIGURE 17.9 The Misc property page for a shortcut to a DOS application.
The following list explains the options on the Misc property page:
TABLE 17.1 Windows Shortcut Keys
| Shortcut Key | Combination Function |
| Alt+Tab | Displays list of running applications |
| Alt+Esc | Switches in order through each running application |
| Ctrl+Esc | Displays the Start menu |
| PrtSc | Copies the entire screen image to the Clipboard |
| Alt+PrtSc | Copies the current window or dialog box to the Clipboard |
| Alt+Enter | Switches an application between full-screen and window mode |
| Alt+Space | Activates an application's Control menu |
Windows 98 provides the DOS application window, a useful and somewhat-customizable window for running DOS applications when the DOS application window is not in full-screen mode. The DOS application window features TrueType fonts that scale as you resize the window and a toolbar that gives you access to some useful features, such as changing the font size and displaying the DOS application's property sheet. This section examines the toolbar options and copying and pasting data to and from the DOS application window.
Figure 17.10 shows the DOS application window with labels for each of the buttons on the toolbar. To display the toolbar, you must enable the Display toolbar option on the Screen property page.
FIGURE 17.10 Toolbar buttons on a DOS application window.
The toolbar buttons are explained in the following list:
When the DOS application window is in window mode, you can copy and paste data to and from the window the same as you can with a Windows application. To select and copy text that appears in the DOS application window, click on the Mark button on the toolbar; then use the mouse to click and drag over the text you want to copy. Alternatively, you can use the keyboard to select text. To do so, move the cursor to the beginning of the text you want to copy. Then press and hold the Shift key as you use the cursor keys to select the text you want. After you select the text, click on the Copy button on the toolbar to copy the data you selected to the Clipboard.
To paste data into the DOS application window, position the cursor at the point to which you want to copy the data; then click on the Paste button on the toolbar.
NOTE: If you enable QuickEdit mode on the Misc property page for the DOS application, you can use the mouse to highlight and copy text. Click and drag over the text you want to copy. After you highlight all the text, right-click to copy the text to the Clipboard.
Although much of Windows 98's user functionality is built into its new graphical design, users who prefer to use DOS command-line functionality can still do so in Windows 98. The MS-DOS prompt is a standard choice in the Program group of the Start menu, so the DOS command line is just a menu choice away. The DOS command-line functionality Windows 98 provides has been modified to include new commands and tools and is streamlined by the removal of inappropriate, obsolete commands.
Table 17.2 shows the commands you can issue at the DOS command line. The table includes those commands you can use to configure Windows 98 in CONFIG.SYS and AUTOEXEC.BAT, as well as batch file utilities. To get help with any of these commands, type the command, followed by /? at the DOS prompt; then press Enter. Table 17.3 shows the commands you can no longer use in Windows 98. Not included in these tables are the commands you use with the TCP/IP protocol.
TABLE 17.2 Windows 98 DOS Commands
| ATTRIB | BREAK | BUFFERS | CALL |
| CD | CHCP | CHDIR | CHKDSK |
| CHOICE | CLS | COMMAND | COPY |
| COUNTRY | CTTY | DATE | DEBUG |
| DEFRAG | DEL (erase) | DELTREE | DEVICE |
| DEVICEHIGH | DIR | DISKCOPY | DOS |
| DOSKEY | DRIVPARM | DRVSPACE | ECHO |
| EDIT | EMM386 | ERASE | EXIT |
| EXPAND | FC | FCBS | FDISK |
| FILES | FIND | FOR | FORMAT |
| GOTO | IF | INCLUDE | INSTALL |
| KEYB | LABEL | LASTDRIVE | LH |
| LOADFIX | LOADHIGH (lh) | MD | MEM |
| MENUCOLOR | MENUDEFAULT | MENUITEM | MKDIR |
| MODE | MORE | MOVE | MSD |
| NET CONFIG | NET DIAG | NET INIT | NET LOGOFF |
| NET LOGON | NET PASSWORD | NET PRINT | NET START |
| NET STOP | NET TIME | NET USE | NET VER |
| NET VIEW | NLSFUNC | NUMLOCK | PATH |
| PAUSE | PROMPT | RD | REM |
| REN | RENAME | RMDIR | SCANDISK |
| SET | SETVER | SHELL | SHIFT |
| SMARTDRV | SORT | STACKS | START |
| SUBMENU | SUBST | SWITCHES | SYS |
| TIME | TYPE | VER | VERIFY |
| VOL | XCOPY |
TABLE 17.3 Obsolete DOS Commands
| APPEND | ASSIGN | BACKUP | COMP |
| DOSSHELL | EDLIN | EGA.SYS | FASTHELP |
| FASTOPEN | GRAFTABL | GRAPHICS | HELP |
| INTERLINK | INTERSVR | JOIN | MEMCARD |
| MEMMAKER | MIRROR | MSAV | MSBACKUP |
| POWER | PRINTER.SYS | QBASIC | |
| RAMDRIVE.SYS | RECOVER | REPLACE | RESTORE |
| ROMDRIVE.SYS | SHARE | SMARTMON | TREE |
| UNDELETE | UNFORMAT | VSAFE |
To start an application, type the following:
START <application name>
Typing START WINWORD.EXE, for example, launches Microsoft Word for Windows. You also can launch an application and open a file at the same time from the DOS command line. Windows 98 launches the application that it associates with the filename. To do so, type the following:
START <document name>
Typing START EXPENSES.XLS, for example, launches Microsoft Excel for Win-dows because Windows 98 associates the XLS extension with Excel. You can launch a DOS application the same way. To launch the DOS editor, type the following:
START EDIT
To get help with the START command, or to see any of the options for the command, type START /? at the command line.
You've probably realized in reading this chapter that much of what used to be known as DOS has been incorporated into the Windows 98 operating system. Most of the DOS commands and utilities still exist, however, and are readily available for those users who still find the DOS prompt a comfortable means of interacting with their computers. If you require additional information about any of the DOS commands included with Windows 98, simply open a DOS prompt and issue the command followed by the /? switch. Most of the DOS commands respond with a description of their function and optional parameters.
© Copyright, Macmillan Computer Publishing. All rights reserved.