Running DOS Programs on XP
DOS programs are the oldest, and since Microsoft dropped the DOS Compatibility Mode from Windows XP, you might think it dropped support for DOS programs altogether. In fact, new options in Windows XP may make running DOS programs easier.
Right-click on a DOS program, and select Properties from the pop-up menu. Most of the tabs in the Properties dialog are familiar, but the Compatibility tab is new. This tab lets you set the program to run in 256-color mode and at a resolution of 640-by-480. You can also disable the default visual themes that Windows XP imposes on programs.
There's also a less obvious and more powerful tool. With DOS, you could fine-tune the environment for your programs by modifying the Config.sys and Autoexec.bat files. In some cases, you'd reboot the system with a special configuration just for one program and then go back to the normal setup to run other programs. Windows XP lets you define a customized Config.sys and Autoexec.bat for each of your DOS programs.
Here's how it's done. First, copy the C:\Windows\System32\Config.nt and C:\Windows\ System32\Autoexec.nt files to the directory of your DOS program, then edit them to reflect the configuration you want. Save them with a new name. Bring up the Properties dialog for the DOS program, move to the Program tab, and click on the Advanced button.
Enter the Config and Autoexec filenames you created for the program and Windows XP will run the program in its own customized environment. This dialog also lets you try to slow down DOS programs that performed actions based on the clock speed of your processor. Programs that ran well on a 50-MHz system can be unusable on an 850-MHz system without this
Windows Programs Not Designed for XP
The three main reasons older Windows programs fail under Windows XP are that they query for a specific Windows version number, they expect results that older versions of a Windows API call return, and they expect user folders to be in a different location or format. These problems can be fixed by setting the Windows program to run in compatibility mode.
Right-click on a Windows program, and select Properties. If you click on the Compatibility tab, you will see a drop-down list that lets you set the OS best suited for this program. Click in the Compatibility mode box, and select the operating system. Using this mode will activate a set of patches (called shims) that make Windows XP treat the program as an earlier version of Windows would.
What if you aren't sure which environment to use, or the program has other compatibility problems? There is a powerful package hidden on the Windows XP CD that will help you fine-tune your application environment.
The Application Compatibility Toolkit
In the \Support\Tools directory of the Windows XP CD, Microsoft included an Application Compatibility Toolkit (ACT). An update (Version 2.5) came out in April, and you can download it from www.microsoft.com/windows/appexperience. The ACT contains four tools for improving application compatibility.
Two of the tools, Application Verifier and PageHeap, are designed for software developers, who use them with a debugger to test areas that might pose problems under Windows XP. But the other two, QFixApp and Compatibility Administrator, can help end users tweak the environment so that older apps run successfully.
QFixApp lets you test a number of low-level tweaks on a specific application. We don't have enough space to discuss each of the 199 applicable fixes, so we'll cheat and show you a couple of shortcuts to finding the particular shims that will restore your program.
Open QFixApp, and select the application you need to work on. Click on the Layers tab, and select a layer. The layers in QFixApp correspond to the compatibility modes we saw earlier in the application's Properties dialog. Select a layer, such as Win95, and then select the Fixes tab. You can see that the Win95 compatibility mode is a predefined set of 54 shims ( Figure 1 ). This number can fluctuate, however, depending on whether you've installed the latest patches and updates.
From there, you can tailor the list to add or remove shims. For example, if your application changes the screen mode and your system is stuck there when the program ends, scroll down and try the ForceTemporaryModeChange fix. As you select a fix, a description of its function appears in the lower pane. Click on the Run button to test the effect of the changes on your application. When you close QFixApp, the environment changes you've made will be stored with the executable. Until then, you can select and deselect shims as you wish.
Browsing Predefined Fixes
You don't have to search for fixes by trial and error. Microsoft includes a number of predefined fixes, and you can browse those for tips.
Open the Compatibility Administrator tool ( Figure 2 ), and expand System Database | Applications. A good start in tweaking your application is to find a similar program in the database. For example, if you are working with a program in the 102 Dalmatians series, select one of the programs in that series for which Microsoft has already defined fixes. Cross-referencing with QFixApp, you see that the EmulateHeap and EmulateMissingEXE fixes are already included in the Win95 compatibility mode, but the IgnoreAltTab fix isn't. Try setting this shim in QFixApp and running your application.
Note that Windows XP provides predefined fixes for the application's setup program as well as the app itself. You can group the fixes associated with an application into one package.
Compatibility Administrator becomes even more important in corporate IT departments that need to support legacy applications. Once you have determined which set of fixes is required, click on New and a new database is created under Custom Databases. With the new database selected, click on Fix to open a wizard that will guide you through creating an application fix set for this database. Follow the prompts to choose a compatibility mode, and set the additional shims you identified during your QFixApp testing. Finally, group related files with this application. Windows XP will try to find these for you when you click on Auto-Generate. Use File | Save to save the custom database to an SDB file that you can send to other computers.
If you have a number of legacy applications that all require similar sets of fixes, you can create a new compatibility mode in your custom database. With the database highlighted, click on Mode. You can name the mode Legacy and select the set of fixes to be applied when this mode is selected. Once the database has been saved and installed, you can apply the whole set of fixes to a new app simply by selecting the Legacy compatibility mode. To add this mode to another system, copy the SDB file to the other computer and run Sdbinst.exe to install it.
The Windows NT platform earned its reputation for being reluctant to run older applications. But with the new tools in Windows XP, you have a better chance than ever of keeping your legacy programs going until they can be updated.
Credit goes to "Old Apps Find A New Home On Windows XP" By
OTHER COMMENTS FROM OTHER PEOPLE...
I was able to run Doom and Duke Nukem (at the worst screen resolution) and
even the very old PC Pacman this way. I was also able to run Command and
Conquer, although the sound was crackly.
Doom also has sound problems. There is a batch file out there called CLI2NOP that can fix most of it. Try searching the web, as a bunch of old DOS games apparently have the same problem. (I actually use the Doom Legacy port now, though.)
I've actually modified my boot.ini file in C: to look like this.
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Windows XP Home Edition" /fastdetect
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Windows XP Home Edition, VGA Enabled"
Notice the /BASEVIDEO tag. This gives me the VGA option every time I start. The timeout gives me three seconds to decide (Don't use my boot.ini file. Just go to yours and copy that first line under [operating systems] exactly as it is and add the /BASEVIDEO tag and the "VGA Enabled" in the quotes.)
There are a number of ways to run older dos apps. Running in a window in NTVDM is probably the best way to do it. Although, the old full screen method, ALT+Enter is still accessible. There are a few things that are appropriate to set up. First and formost, everytime you run command, the autoexec.nt and config.nt are run from within System32. You will need to 'tweak' these a little. Set files = 200 for starters. Also, if you are going to have XP respect the space that the Dos app requires, you will need to define the space that the app runs in, by this I mean configure the shortcut that starts your dos prompt, or the short cut that links directly to the app itself. There is a memory tab linked to the icon, you should set all the memory tabs listed at there max, bar one, you should set Expanded (EMS) Memory to NONE. Also adjust slider sensitivity to LOW from the Misc Tab.