by Rob Tidrow
Before Windows became the standard operating system on the majority of personal computers, MS-DOS was the standard. Because of this, thousands of applications were created to run specifically under MS-DOS. Many users want to make sure their old DOS programs still will run under Windows 98. In many cases, Windows 98 will run older DOS programs, and in some cases, Windows 98 will run them more efficiently than in a standalone DOS environment.
On a Windows 98 computer, DOS is available in two flavors:
The DOS session starts from within Windows 98. You can switch the DOS session between a windowed view and a full-screen view. From a DOS session, you can switch back to Windows 98 and to any other currently running application. Windows 98 is a multitasking environment, and each DOS session runs in a separate MS-DOS virtual machine (VM). In a windowed DOS session, Windows 98 even provides a toolbar for quick access to cut, copy, and paste operations; property pages; and fonts. The property pages are similar to the old Windows 3.x PIF files. The property pages for DOS sessions enable you to control the MS-DOS VM and what the DOS program sees. (You can even hide Windows 98 from the DOS program!)
You can start MS-DOS mode from within Windows 98, or you can access MS-DOS during bootup. MS-DOS mode (also known as real mode) is a single-task environment. No other programs are in memory, so you cannot switch over to another program. Windows 98 leaves a small footprint of itself in memory so that when you close your DOS application (or type exit at the DOS prompt), Windows 98 can load automatically. In MS-DOS mode, you cannot cut, copy, or paste to the Clipboard. The DOS application has complete control of the CPU and all resources.
For DOS programs that you start from MS-DOS mode, you can specify certain properties. Properties that require Windows 98, such as fonts, memory management, and screen display, are not available. However, you can specify a custom AUTOEXEC.BAT and CONFIG.SYS to be run for each DOS program running in MS-DOS mode (no more creating separate boot disks for finicky DOS programs that require special treatment).
Although most of the time Windows 98 provides tools for your computing needs via a user-friendly graphical interface, there might be times when you need to or (for us old-timers) want to access DOS. You don't need to exit Windows 98 to access the DOS command prompt or to issue a DOS command.
TIP: To start a Windows 98 program from the command prompt, type the new DOS command START followed by the program name.
TIP: A handy utility available with Microsoft Power Toys is DOS Prompt Here 1.1. This utility enables you to start an MS-DOS prompt from any folder by clicking a button from the folder of your choice. Download this utility by visitinghttp://www.microsoft.com/windows95and clicking the Free Software button on the left side of the Web page. Then select Shareware and Utilities from the fly-out menu. Next, click the Power Toys hyperlink. You can download Command Prompt Here 1.1 by itself (about 7KB) or with the Power Toys Set (about 204KB).
To display the DOS command prompt from within Windows 98, follow these steps:
FIG. 27.1 The windowed DOS session provides you with more control over the DOS environment.
CAUTION: Be careful when using the x button to close a windowed DOS session. You could lose data in any open DOS applications or data files that contain unsaved data, or your files could be corrupted as a result. Always close data files and end DOS applications before using the x button.
NOTE: To display help for a DOS command, type the name of the command you want, followed by a space and /?. For example, type MD /? to display help text on the Make Directory (MD) command.Adding the pipe character (|) and the word MORE to the end of the statement displays help text one screen at a time, as in this example:
MD /? | MORE
FIG. 27.2 A full-screen DOS session lets you see more onscreen.
To start the computer at the DOS prompt in MS-DOS mode, follow these steps:
NOTE: You also can enter MS-DOS mode when your machine boots up. When the message Starting Windows 98 appears, press F8 and select Command Prompt Only to boot up the computer in the real-mode version of DOS. When you finish, type EXIT to start Windows 98.
The Windows 98 set of DOS commands is functionally the same as in prior versions of DOS. You can view a list of these commands by opening the \WINDOWS\COMMANDS folder. File- manipulation commands such as COPY, DIR, and RENAME have been enhanced to support long filenames. You can use a long filename that contains spaces, for example, by enclosing the long filename in quotation marks:
RENAME eastsale.wk1 "Eastcoast Sales.wk1"
CAUTION: Be careful when using long filenames. Although the Windows 98 DOS commands support long filenames, existing DOS and Windows 3.x programs do not. Furthermore, be careful when using a file in Windows 98 with a long filename and then accessing the file in a DOS or Windows 3.x program. Doing so deletes the long filename!Finally, you can store only 512 files in the root directory when using the FAT file system. Long filenames consume two directory entries, so keep this in mind as you create and add new files to your system.
The DIR command has been enhanced to display a seventh column that shows the long filename. DIR also sports a new command-line switch called verbose: /v. The verbose switch displays additional information, such as file attributes and the last-access-date stamp.
Windows 98 DOS also supports the Universal Naming Convention (UNC). UNC makes it easier to refer to and use networked resources such as printers and network folders. (You no longer need to map folders and remember those cryptic addresses.) To copy a file to a shared network folder named Accounting Sales Data, for example, you would issue the following command line:
COPY "Eastcoast Sales.wk1" "\\Accounting Sales Data"
Many of the DOS commands included in prior versions of DOS are not included in Windows 98 because they no longer are needed. In these cases, Windows 98 provides the features elsewhere. Furthermore, if your computer did not have DOS installed prior to installing Windows 98, you will not have some of the older DOS commands that Windows 98 does not need but leaves in the old DOS folder.
A powerful command included in Windows 98 is the START command. You can use START to launch DOS and Windows programs from the DOS command prompt. (START is not available in MS-DOS mode.) You can use two syntax forms. The first supplies the program name. The second syntax supplies the document name. For the document name to launch the program and display the document, the filename extension must be registered properly:
START [options] program [arg...] START [options] document.ext
The options available follow:
/m | Runs the new program minimized (in the background) |
/max | Runs the new program maximized (in the foreground) |
/r | Runs the new program restored (in the foreground); this is the default |
/w | Does not return until the other program exits |
Suppose that files with the extension DOC are registered as Word for Windows files. Then issuing the following command loads Word for Windows and the document sales.doc:
START sales.doc
Using START at the command prompt to load a DOS program actually opens a new MS-DOS VM for that program. If, instead, you type the name of the DOS program without the command START, the DOS program loads in the current MS-DOS VM.
NOTE: If you type the DOS command VER at the command prompt, the version information that appears is Windows 98. However, DOS programs that ask internally for the DOS version get the number 7. This could cause conflicts with DOS programs that work only for a specific DOS version number.
Some DOS commands should not be used in Windows 98: CHKDSK /F You can run this command at the DOS prompt but not in Windows 98.
FDISK Avoid running this command at the DOS prompt; it can't be used when Windows 98 is running. RECOVER This command exists from an older version of DOS, and it doesn't work well with Windows 98 or at the command prompt.
TIP: To configure the DOS command-line sessions, set file properties for COMMAND.COM, which is located in Window's Command folder.
Starting a DOS program takes a few more steps than you might be used to, but it does have the advantage of being less cryptic than navigating the DOS prompt and cryptic command lines.
To start a DOS program, follow these steps:
You also can start a DOS program by using any of the following options:
When you work in a DOS window, Windows 98 provides you with a very helpful toolbar for easy access to the following features:
NOTE: You cannot paste text into a DOS program when it is running in full-screen mode.
TIP: To select text by dragging the cursor over the selection, open the Properties dialog box for the DOS program, select the Misc tab, and click QuickEdit.
To view the toolbar, click the MS-DOS icon in the title bar and click Toolbar.
In Windows 3.x, DOS applications were configured by editing a program information file (PIF). The PIF file had to be manually created and maintained by the user via the PIF Editor. This was cumbersome at best. Windows 98 automates PIF creation and moves the configuration maintenance into a series of Properties dialog boxes.
When you first start a DOS application, Windows searches for a PIF file with the same name as the executable file. If Windows finds an existing PIF file, Windows uses the program info file file settings. If no PIF file exists yet, Windows uses default settings to control the DOS application. Windows 98 uses a database of known DOS application settings to create the PIF. The PIF files are viewed and maintained via the property pages.
NOTE: Windows 98 stores all PIFs in a hidden PIF folder in the Windows 98 directory. This keeps novice users from inadvertently altering the actual PIF files.
You set properties for a DOS program the same way you set properties for any object in Windows 98--by right-clicking the object and choosing Properties. Windows 98 then displays the property pages for the DOS application (see Figure 27.3). DOS program properties are organized into six property pages. You'll learn more about each of the property pages in the following sections.
To display the property pages, follow these steps:
TIP: To display property pages while running the DOS program session, press Alt+Spacebar and choose Properties.
FIG. 27.3 You control how DOS programs execute in Windows 98 by setting program properties.
The General property page displays the filename, size, location, file type, and other general information (refer to Figure 27.3). The only configuration settings you can change are the file attributes. Changing file attributes here is identical to using the DOS ATTRIB command at a DOS prompt. Table 27.1 describes each file-attribute setting.
Attribute | Description |
Read-Only | Specifies that the file can be read, moved, and copied, but that it cannot be changed or erased. |
Archive | Marks a file as having been changed since it was backed up last. |
Hidden | Specifies that the file is not displayed in directory listings. Most DOS commands, such as COPY and DEL, won't work on hidden files. |
System | Marks a file as belonging to the operating system (Windows 98 or DOS). System files are not shown in directory listings. Currently, Windows 98 does not enable you to set the System attribute here. However, if a file has the System attribute set, it will appear checked, although dimmed. |
The Program properties page enables you to control many application settings, such as the command line, working directory, shortcut key, and icon (see Figure 27.4). From the Program properties page, you can click Advanced to configure how Windows 98 emulates the DOS environment for this program. Clicking Change Icon enables you to browse through icon files and select a new icon for the program.
FIG. 27.4 On the Program properties page, you can specify the working folder.
To set Program properties, follow these steps:
Setting Advanced Program Properties The Advanced Program Settings dialog box enables you to configure the DOS environment where the DOS program will run (see Figure 27.5). You can hide Windows 98 from the DOS program, allow Windows 98 to switch to MS-DOS mode as needed, or require that the DOS program always be run in MS-DOS mode. Table 27.2 describes the Advanced property settings available.
FIG. 27.5 Use the Advanced Program Settings dialog box to control the DOS program execution environment.
Setting | Description |
Prevent MS-DOS-Based Programs from Detecting Windows | Hides Windows 98 from the DOS program. This option is not enabled if MS-DOS mode is selected. |
Suggest MS-DOS Mode as Necessary | Tells Windows 98 to detect whether the DOS program runs better in MS-DOS mode. If so, Windows 98 executes a wizard to set up a custom icon to run the program. This option is not enabled if MS-DOS mode is selected. |
MS-DOS Mode | Runs the program in MS-DOS mode. |
Warn Before Entering MS-DOS Mode | Tells Windows 98 to display a warning message that it will close all programs before running MS-DOS mode. |
Use Current MS-DOS Configuration | Tells Windows 98 to use the existing (default) AUTOEXEC.BAT and CONFIG.SYS files when it enters MS-DOS mode. |
Specify a New MS-DOS Configuration | Creates alternative CONFIG.SYS and AUTOEXEC.BAT files. Enables the CONFIG.SYS and AUTOEXEC.BAT text boxes and the Configuration button. |
CONFIG.SYS for MS-DOS Mode | Enables you to edit as needed to create a custom CONFIG.SYS file for MS-DOS mode. |
AUTOEXEC.BAT for MS-DOS Mode | Enables you to edit as needed to create a custom AUTOEXEC.BAT file for MS-DOS mode. |
Configuration | Tells Windows 98 to create custom configuration files for you. (This helps you avoid typing in commands.) |
By default, DOS programs run from Windows 98 in a DOS window. Alternatively, DOS programs can be executed in MS-DOS mode (also called single-application mode or real mode). In MS-DOS mode, the DOS program controls all system resources. Before running a program in MS-DOS mode, Windows 98 closes all active Windows and DOS programs. Only a small portion of Windows 98 remains in memory so that Windows 98 can reload itself into memory when you exit the program. Setting up a program to use MS-DOS mode is the same as shutting down Windows 98, restarting in MS-DOS mode, and then rebooting your machine to Windows 98. MS-DOS mode generally is used for DOS programs that will not run under Windows, such as DOS games.
NOTE: Windows 98 property pages exist for all DOS programs, whether started in MS-DOS mode, from the command prompt, or as a Windows 98 DOS session. For those applications set up to run in MS-DOS mode, many properties do not apply and therefore are not available. When MS-DOS mode is selected, only the following properties are enabled:
General File attributes Program Icon Text, Command Line, Close on Exit, Change Icon, and the advanced MS-DOS mode options
Font, Memory, Screen, and Misc pages are blank.
TIP: If a DOS program detects Windows 98 and won't run properly, select Prevent MS-DOS-based Programs from Detecting Windows in the Advanced Program Settings dialog box.
To allocate all system resources to a DOS program (run in real-mode or single-application mode), follow these steps:
FIG. 27.6 For programs starting in MS-DOS mode, you can create custom AUTOEXEC.BAT and CONFIG.SYS files by selecting options.
Changing Program Icons As with every object in Windows 98, DOS-based programs have a graphical picture called an icon associated with the program file. By default, the icon can appear in the following places:
If the program file doesn't specify an icon, Windows 98 uses the MS-DOS icon. You can change the icon by opening the DOS Properties dialog box and clicking Change Icon. Windows 98 displays the Change Icon dialog box, as shown in Figure 27.7. To view the contents of another icon file, type the filename or click Browse to find the file. After selecting the icon, click OK twice to save your changes.
FIG. 27.7 The PIFMGR.DLL file contains many icons that you can assign to program files.
NOTE: You can find more icons in the following folders:
\SYSTEM\SHELL32.DLL \MORICONS.DLL \SYSTEM\ICONLIB.DLL \PROGMAN.EXE
Assigning a shortcut key to a DOS program gives you quick access to your favorite DOS programs. You can use the shortcut key to start the program or to switch back to it once it is running.
Windows 98 contains many shortcut keys (called access keys), so you need to be careful when assigning your own shortcut keys. Here is a list of the rules:
A feature in Windows 98 that is not supported in Windows 3.x is the capability to control font size and appearance. Windows 98 enables you to use any bitmapped or TrueType font installed on your computer. The font settings work in full-screen and windowed DOS sessions. Figure 27.8 shows the Font property page you can use to improve the display of your DOS sessions.
FIG. 27.8 You can reduce eye strain by changing the font type and size.
In addition to giving you control over the font type and size, Windows 98 provides an Auto font-size feature (located in the Font Size scroll box) that automatically adjusts the font size to fit the size of the DOS window. This feature enables you to see all 80 characters, even when you reduce the size of the DOS window.
TIP: Use the Auto font-size setting to automatically scale DOS session windows.
To set font properties for a DOS program, follow these steps:
The settings on the Memory page control the way the DOS application uses the PC's memory (see Figure 27.9). Settings are provided to control conventional, expanded (Expanded Memory Specification or EMS), and extended (Extended Memory Specification or XMS) memory. Note that since each DOS application executes in its own MS-DOS VM, the memory settings apply only to that DOS application. Other executing DOS, Windows 3.x, and Windows 98 applications are not affected by these memory settings. Table 27.3 describes the Memory property settings.
FIG. 27.9 You can customize the memory configuration for each DOS application.
Setting | Description |
Conventional Memory | |
Total | Specifies the amount of conventional (lower 640KB) memory the program requires. If you are unsure about this setting, choose Auto. |
Initial Environment | Specifies the number of bytes to reserve for COMMAND.COM. If set to Auto, the size is determined by the SHELL= line in CONFIG.SYS. |
Protected | Protects the system from any problems caused by the program. The program might run slower when this check box is enabled. |
Expanded Memory (EMS) | |
Total | Specifies the maximum amount of expanded memory allotted to the program. The Auto choice sets no limit. If you experience problems, try a setting of 8192. |
Extended Memory (XMS) | |
Total | Specifies the maximum amount of extended memory allotted to the program. The Auto choice sets no limit. If you experience problems, try a setting of 8192. |
Uses HMA | Indicates whether the program can use the High Memory Area (HMA). |
MS-DOS Protected Mode Memory (DPMI) | |
Total: | Specifies the maximum amount of DOS protected mode memory (DPMI) to allocate to the program. The Auto setting lets Windows 95 configure this based on your setup. |
The settings on the Screen property page control the way the DOS application appears (see Figure 27.10). You can set up the DOS program to load in a window or full-screen--with or without a toolbar--and determine how many lines of text should appear. In addition, you can set display performance features such as dynamic memory allocation and fast ROM emulation. Table 27.4 describes the Screen properties.
Setting | Description |
Usage | |
Full-Screen | Starts the program in full-screen mode. |
Window | Starts the program in a window. |
Initial Size | Sets the number of screen lines displayed (25, 43, or 50 lines). A setting of Default uses the program's number of lines. |
Window | |
Display Toolbar | Displays the toolbar if the program is running in a window. |
Restore Settings on Startup | Restores the font and screen settings when you close the program (if you are running the program in a window). |
Performance | |
Fast ROM Emulation | Controls the read-only video-memory usage. Select this to speed up the screen display and refresh feature. If the program has problems writing text to the screen, disable this check box. |
Dynamic Memory Allocation | Controls the amount of memory available to switch between text and graphics mode in a DOS program. If you want to maximize the amount of memory available to other programs while this program runs, check this box. If you want to maximize the memory available to this program, disable this check box. |
FIG. 27.10 By turning on dynamic memory allocation, you can speed up the display performance of a DOS program.
The remaining DOS program properties are grouped on the Misc page (see Figure 27.11). On the Misc property page, you can control foreground and background settings, the mouse, shortcut keys, and other items. Table 27.5 describes the miscellaneous settings.
FIG. 27.11 The Misc property page enables you to resolve conflicts between Windows shortcut keys and DOS programs.
Setting | Description |
Foreground | |
Allow Screen Saver | Enables the screen saver to work even when the program is active. |
Background | |
Always Suspend | Prevents the program from using system resources when not active. |
Idle Sensitivity | |
Low to High | Specifies how long Windows allows the program to remain idle before redirecting CPU resources to other programs. Slide toward Low to give the DOS program a longer idle time (more resources). Slide toward High to take resources away from the DOS program sooner. |
Mouse | |
QuickEdit | Enables the Quick Edit feature, which enables you to select text for cutting and copying functions with the mouse (otherwise, you must mark text first). |
Exclusive Mode | Specifies that the mouse is controlled exclusively by the DOS program. The mouse no longer is available in Windows. |
Termination | |
Warn If Still Active | Specifies that a warning message is displayed if you try to close a running DOS application. |
Other | |
Fast Pasting | Enables the fast-paste feature. Could cause problems with older DOS programs. |
Windows Shortcut Keys | |
Alt+Tab Alt+Esc Ctrl+Esc PrtSc Alt+PrtSc Alt+Enter Alt+Space |
Enables you to deselect certain Windows shortcut keys to disable those keys when the program is running. |
© Copyright, Macmillan Computer Publishing. All rights reserved.