Setting the stage for legacy applications
in Windows XP Page 2 of 2
Running MS-DOS programs in Windows XP
Running an MS-DOS program under XP isn’t much different from running one under earlier Windows versions. If it doesn’t run correctly with the default settings, you can adjust the settings from the executable file’s Properties box.
When you adjust an MS-DOS program’s properties, you’re creating a Program Information File (PIF) file for it. As you may remember from earlier Windows versions, a PIF file is a shortcut for a DOS program that sets up a compatible environment in which it can run.
Note
When you double-click the executable file for an MS-DOS program for which you have not specifically set any properties, it uses the file _default.pif, located in the %SystemRoot% folder. If you want to change the default settings for MS-DOS programs, modify the properties for that file rather than for the executable file for a particular application.
Windows 9x included an MS-DOS Mode, which rebooted the system into a true real-mode MS-DOS environment. Windows XP doesn’t include this—it can’t because it’s not based on the MS-DOS kernel. However, it does provide a host of settings you can adjust to try to make an MS-DOS program work a little better.
Here are some of the settings you can adjust:
| Figure B |
Note
You can directly edit Autoexe.nt and Config.nt in Notepad to change the default settings for all MS-DOS applications.
- If you’re having timing problems with the application, click the Advanced button on the Program tab and select the Compatible Timer Hardware Emulation check box (Figure B).
- On the Memory tab, you can specify a certain amount of various types of memory to be allocated to the application (conventional, XMS, EMS). This might be useful if the program won’t start because it thinks it doesn’t have enough memory. Some programs check at startup to make sure that there’s a large memory pool available, but Windows XP allocates memory to each program on an as-needed basis; allocating a specific amount of memory here can trick the program into working.
- If you’re having video problems, go to the Screen tab and try deselecting the Fast ROM Emulation check box.
- If you’re having problems with the mouse pointer, go to the Misc tab and turn on Exclusive Mode for the mouse (Figure C).
| Figure C |
![]() |
- By default, MS-DOS programs stop running when they’re not in the foreground. If you want the program to continue running in the background when you switch away from it, go to the Misc tab (Figure C) and clear the Always Suspend check box.
- If the program uses a shortcut key combination that Windows uses, Windows will take precedence, and you won’t be able to use that key combination in the application. To give the application precedence for a particular key combination, deselect the key combination’s check box on the Misc tab (Figure C).
- If the program terminates with an error when the Windows screen saver tries to kick in, clear the Allow Screen Saver check box on the Misc tab (Figure C).
- While there’s no specific compatibility mode for MS-DOS, an MS-DOS program’s Properties box contains the same Compatibility tab as other applications and shortcuts. This might be useful in cases where an MS-DOS program ran successfully under Windows 95 but won’t run under Windows XP.
Conclusion
You’ve learned how to set up Compatibility Mode for an application both manually and with a wizard, and how to configure MS-DOS program settings for best performance under Windows XP. Not every MS-DOS and older Windows program will run under Windows XP, but the vast majority will. The new Compatibility Mode feature goes a long way toward maintaining backward compatibility without unduly crippling Windows XP for more modern applications.



















I have MS-Dos executable program compiled in Clipper5.3. It was running perfectly in NT4.0 but it is not running at the first attempt in XP. To run this program I have to create a batch file then type the executable file name twice or in the command prompt, have to enter the file name twice.
I tried all the options with config.nt, autoexec.nt, hardware emulation and the compatibility options but issue remain same. Can anyone help me?
Posted by MTN Networks on Wednesday, October 02 2002 06:37 PM