Recipe 4.10. Running DOS Programs in Their Own Optimized Environments


Problem

You have an older DOS-based application that you want to run, but it requires its own customized Autoexec.bat and Config.sys files.

Solution

The operating environment for DOS programs are set by the Config.sys and Autoexec.bat files. Windows lets you create fine-tuned, customized environments for each separate DOS program by building individual Config.sys and Autoexec.bat files for each. To do so:

  1. Copy Config.nt and Autoexec.nt files to the directory of the DOS program you plan to run. Typically, the files are found in the C:\Windows\System32 folder.

  2. Rename the files and edit them to reflect the specific conditions that are best suited for the DOS program you're going to run.

  3. Right-click on the icon of the DOS program, and select Properties Program Advanced. Fill in the names of the Autoexec and Config files, as shown in Figure 4-8. If they're outside your PATH, include the path names.

  4. If the program performs actions based on the speed of the processor (such as certain games), check the Compatible timer hardware emulation box.

  5. Click on OK. The DOS program will now run in its own customized environment.

Figure 4-8. Edit a DOS file's PIF settings to create its ideal operating environment


Discussion

Config.sys and Autoexec.bat files are used to create customized environments for DOS programs to run. Typically, an Autoexec.bat file automatically runs a series of commands, while Config.sys sets environment variables, defines path, and contains other, similar settings, such as how to handle memory. For example, a Config.sys file might look like this:

DEVICE=C:\WINDOWS\HIMEM.SYS DOS=HIGH,UMB DEVICE=C:\WINDOWS\EMM386.EXE NOEMS FILES=30 STACKS=0,0 BUFFERS=20 DEVICEHIGH=C:\WINDOWS\COMMAND\ANSI.SYS DEVICEHIGH=C:\MTMCDAI.SYS /D:123

See Also

MS KB 314106, "Troubleshooting MS-DOS-based programs in Windows XP." For help in running DOS-based games on Windows XP, see http://www.longhighway.com/sandbox/xp.html.



Windows XP Cookbook
Windows XP Cookbook (Cookbooks)
ISBN: 0596007256
EAN: 2147483647
Year: 2006
Pages: 408

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net