Tips for running MS-DOS programs on today's computers

Tips and techniques for running MS-DOS programs on today's computers

If your browser has problems displaying this page, please email me (link at bottom of page).

Table of Contents:

 Running MS-DOS programs under Win 9x
 Using Slow-down programs for games and other apps
 Credits



Running MS-DOS programs under Windows 9x:

Setting up and running MS-DOS programs in Windows is sadly under-documented by Microsoft, but there is really a lot you can do, and, once you understand the concepts involved, it's fairly easy.  The goal we will accomplish here is to be able to run any MS-DOS program from within Windows Explorer, or from a shortcut on the Desktop, with just a mouse click.  We will also learn how to drag and drop files onto MS-DOS programs in Explorer, and how to add MS-DOS programs to Explorer's right-click 'Send To' menu.  The tools we will use are .pif (Program Information Files) and .bat (batch) files.

Pif files are used exclusively for MS-DOS programs, and serve 2 purposes.  First, they define the operating environment for the program.  Secondly, they provide a shortcut that you can use on your Desktop, or in any other folder.  As a comparison, shortcuts for Windows programs are called .lnk (link) files, instead.  The way to create a Pif file is to right-click on the .exe or .com file within Explorer, select 'Properties', then change the data in the window that appears, and click 'OK'.  Then, you'll see a new file in the folder.  It should have a name like 'Shortcut to MS-DOS program', or something similar.  You can then rename it, change the icon that it uses, or move or copy it to your Desktop or another folder.  There are also many settings that you can specify within the .pif definition, which define the environment that the program will use.

Some of the more important settings in the Pif definition are accessed by clicking the 'Program' tab, and then the 'Advanced' button.  One setting here determines whether the program needs to be run in MS-DOS mode or not.  Some of the differences between MS-DOS and Windows programs are that the former were written to use conventional memory, and to use 'Real Mode' device drivers.  Windows programs, on the other hand, can reside almost anywhere in memory, and use 'Virtual' device drivers, instead.  Since there is only one 640k block of conventional memory, only one MS-DOS session can be run at a time.  Whether that MS-DOS session can be run along-side Windows applications, or needs to be run in MS-DOS (exclusive) mode, is something you'll have to determine.

If the MS-DOS program you want to run doesn't use extended memory, sound devices, or CD access, chances are that it doesn't need real mode drivers, and can be run along-side, and multi-task with, your Windows applications.  Otherwise, you'll probably have to run the program in MS-DOS (exclusive) mode.  Usually, the only way to find this out is to run it within Windows, and if you have problems, modify the program's .pif file to run in MS-DOS mode, instead.  It is more desirable to run the program within the Windows environment if possible, because then you can multitask it right along-side Windows programs.  If you have to run it in MS-DOS mode, instead, the Pif definition will force Windows to reboot into MS-DOS mode, and then you'll only be able to run MS-DOS programs and real mode drivers.  To get back to Windows, you'll then have to end the MS-DOS program and type 'Exit', causing another reboot.  At the end of this section are several links to articles in Microsoft's Knowledge base which may help you determine whether a program needs to be run in MS-DOS mode or not.

If the program requires command line arguments, special environment variables, or that other programs, like slowdown programs (see the next section), be loaded with it, you will need to learn how to write .bat (batch) programs.  The .bat program can be written as a stand-alone program, or, if the program has to run in MS-DOS mode, you can insert the batch commands in the 'Autoexec.bat' section of the program's Pif definition.  In that window, if necessary, you would also define any real mode device drivers the program requires, in the 'Config.sys' section.

After you have created the program's 'Pif' file, you can run it by clicking on it's shortcut, from Explorer or your Desktop.  If you click on the .exe file instead, a copy of the .Pif file must reside in the same folder, and, I believe, with the same name, but with the extension '.Pif', instead of '.exe', for your settings to work.  I think this is also true if you're running a program from a CD.  For your settings to work, the CD autorun must run the .exe from your hard drive, and the .Pif file with the same name must reside in the same folder.  Your Mileage May Vary on these latter points, though.  I have never seen any documentation at Microsoft which explains these situations.

If the Pif file specifies that the program needs to be run in MS-DOS mode, you'll get a warning window telling you that all other programs will be ended first.  Then, your computer will reboot into MS-DOS mode.  Once you're in MS-DOS mode, if you have a crash, or for some other reason need to reboot, you can press Ctrl-Alt-Delete, and your computer will reboot back to MS-DOS mode, not Windows.  To return to Windows, you must type 'Exit' at an MS-DOS prompt.

You can create .Pif files to run specific MS-DOS applications, and you can also create generic .Pif files just to put you into an MS-DOS window or re-boot into MS-DOS mode.   Here are sample config.sys and autoexec.bat entries you can use in a generic shortcut that re-boots into MS-DOS mode, and uses MenuItem blocks to optionally load Soundblaster and CD ROM drivers.  In the Autoexec.bat, there is an option to load MS-DOS's smartdrv.sys real mode caching software.

Besides booting into MS-DOS mode *from* Windows, you can also go into MS-DOS by pressing the F8 key during the boot process.  The F8 key gives you some options like booting into 'Normal', 'Safe', and 'Command line' mode.  The 'Command line' option boots you into MS-DOS mode.  If you find yourself doing this a lot, you can make the boot menu appear automatically, every time you boot, rather than having to hit F8.  To do this, find the hidden file, MSDOS.sys, in your root directory.  Then:

1) Make a copy of it, in case you need to restore it later.
2) Right click on the original file, select Properties, and remove the 'Read Only' attribute.
3) Then, edit the file, adding these entries under the [Options] section:

BootMenu=1
BootMenuDefault=1 (or, one of the other options as a default)
BootMenuDelay=xx (where xx is the delay in seconds)

4) Right click again on the file, and checkmark the read only attribute.

Unfortunately, if you boot into MS-DOS mode this way, your computer will still process the same config.sys and autoexec.bat commands as if you had booted into Windows.  There might be a way to specify a different set of config.sys and autoexec.bat commands if you pick 'Command line' mode, but I don't know what it is.  Check article # Q118579 in the MS Knowledge base, for more information about the MSDOS.sys file.

Other ways to use MS-DOS programs under Windows:

Within Explorer, you can usually drag and drop files onto batch files and other MS-DOS programs, and specify MS-DOS programs as items in your 'Send To' menu (the menu option that you see when you right click on a file).  This will usually work if the program can run while Windows is running.  To do either of these, at most you'll have to write a short batch file and specify a command line argument.  Then, to add the program to your 'Send To' menu, create a shortcut (Pif) for it, then move the shortcut to the '\Windows\SendTo' folder.

Here's a batch program that I use to simply copy a file to my printer from within Explorer.  I've added a shortcut for it to my 'Send To' menu, so I only need to right-click on the file, select 'Send To', and then select the shortcut I have created.  I can also drag and drop a filename onto the program or shortcut and accomplish the same thing.  The file is called 'CopytoLPT1.bat'.  '%1' is the command line argument which will be filled at run time by the complete pathname of the file that the program will act upon:

@echo off
echo %0 running...

if '%1==' for %%v in (echo goto:ERROR) do %%v Required filename missing.
copy %1 LPT1
Rem Some printers require you to send a Linefeed character at this point, to clear out the buffer, and return
Rem the print head to the left margin.  Others don't.
Rem If so, sustitute a Linefeed character (alt-10) for (chr$(10)) in the next line, using a text editor (not Notepad):
echo (chr$(10))>>LPT1

goto done
:ERROR
echo An error has occurred.
:DONE
Echo Finished

You can learn more about writing batch files in books about MS-DOS, which you can find at the library and bookstores.  Two that I've found helpful recently were the Waite Group and Peter Norton books.  You can also find out more about writing batch files, and running MS-DOS programs within Windows, in the MS-DOS Usenet newsgroups, like alt.msdos, alt.msdos.batch, and comp.os.msdos.misc.
Also, check Tom Lavedas' site for advanced batch programming techniques.

You can search Microsoft's Knowledge base for articles dealing with running MS-DOS programs.  Go to  www.microsoft.com .  Then, click 'Search' at the top.  On the next screen, I always uncheck everything except 'Product Information', and 'Support and the Knowledge base'.  Then, type your search phrase, and click the 'Search' button.  Two articles that deal specifically with the subject of this section are Q134400 and Q141308.  To read either of these, just type it as the search phrase.

Return to top of page



MS-DOS & Windows slow-down programs:

Many MS-DOS applications were originally written during a time when most consumer personal computers ran at much slower speeds than today.  For games especially, many times the programmer went beyond the more traditional means of doing things in software, and instead, did things at a much lower, hardware level, in order to extract the fastest speed possible.  Usually, the designer did not allow for the fact that the game or app might eventually be run on faster computers, and so, today, some of the best games and other apps from the 80's and 90's run too fast on today's computers.  For this reason, we now have 'Slow-down' programs.  These programs slow down the cpu through various means, so that the game or app can be run at closer to the speed for which it was originally written.

If the app already has a feature to slow itself down, I would use that first.  If that isn't enough, then I would enhance the slowdown by using an external slow-down program.  The reason why is that the app's internal slow down method would probably provide a smoother slowdown than an external program would, because the internal method is already built into the program's logic.

Usually, external slowdown programs slow down the cpu by inserting a delay in the cpu cycle.  The 2 most important variables to be considered are the # of delays inserted per cycle, and the length of each delay.  If these are not calculated correctly, the game might become too jerky.  For the smoothest slowdown on the fastest computers, I think it's best to use the maximum # of delays possible, and *then* adjust the length of each delay.  These variables are configurable so that you can adjust the amount of slowdown by the slowdown program.

Unfortunately, there are limits to these variables.  For example, in one popular slow-down program, the maximum # of interrupts per second is 8192.  The consequence of this is that the faster your cpu is, the jerkier the slowdown will necessarily be.  That's why I recommend to people who like to play older MS-DOS games, that they don't get any faster computer than they really need.  You may not notice any jerkiness in faster cpu's, but then again you might.  Jerkiness would probably be most noticable in flight sims and other fast moving games.

One anomaly that you might run into, is that you've used a slowdown program to slow your computer down some, but then, when you try to adjust the program's parameters to slow it down even further, the computer actually speeds up, instead.  This could be because the system is running other processes that require interrupts, and if it senses that the interrupts aren't being serviced quickly enough, it speeds itself up to compensate.  This is probably more apt to happen if you're trying to run an MS-DOS program while Windows is running.  Best to reboot your computer in MS-DOS mode and try again.

My 2 favorite slowdown programs are Bremze and  Mo'Slo .  The documentation for Bremze is a little complicated, but I just use the command line 'lh bremze70 /cFFFF', then run the game, then run 'bremze70 /u' to unload it.  The '/cFFFF' tells it to use the longest delay.  If that's too much, I adjust it downward until the game runs smoothly at the speed I want.  What I've found, is that Bremze works better for some programs, and Mo'Slo for others.  So, if one program doesn't work as well as you'd like, just try the other.

I've seen some other programs, too, like at_slow, cpukiller, slow300, slowdown, varislow, and whoapc.  I don't have links for them.  Some slowdown programs will slow down Windows apps, instead of, or in addition to, MS-DOS apps.  For more help, check the Usenet newsgroups that discuss slowdown programs, like the alt.msdos.*, comp.os.msdos.*, and alt.games.* newsgroups.

There is a separate issue, involving apps (not just games) that were compiled under older versions of Borland Pascal.  If you try to run these apps on newer computers, you might get an error message, 'Runtime error 200', caused by a timing problem.  Sometimes slowdown programs will solve the problem, but there are better, more specific, fixes available on the internet.  One solution that works for many is BPPatch.zip .

Return to top of page



Disclaimer: It is believed, at the time of this writing, that the copyright limitations of all the 3rd party resources mentioned, allow their inclusion on this site.  If you believe you see an error, please let me know.


To see my main MS-DOS page, with more tips, techniques, Internet and general purpose apps, and mIRC scripts, many of which are exclusive to this site, click here .

Comments?  Email to baldwinwh (at) netscape (dot) net

Thanks for visiting!

Return to top of page


Viewable With Any Browser

© W. Baldwin, 2001. All rights reserved