Unleashing Windows: Running DOS Programs Under Windows


Even with the ever-growing popularity of Windows Applications, many people still find some DOS programs to be very useful. However, a lot of people have Windows automatically come up on startup. Rather than always leaving Windows to run DOS applications, Windows provides a way to run those programs inside Windows.

The Program Information File (PIF)

Windows uses a file called a Program Information File, or PIF for short, to tell the Windows environment how to allocate memory and resources so that program can run correctly. Windows automatically installs a PIF file on installation called _DEFAULT.PIF. This file is automatically called and run whenever a DOS program tries to execute. The exception to this is if a separate PIF files exists for an application. However, the default PIF file may not allocate enough resources for a particular application.

In this case, there are two ways to create a PIF file for a particular application. The first is to go to the Windows Setup icon and choose Set up applications from the Options menu. The second way is to manually create your own PIF file from the PIF Editor icon.

The first way is usually the best way to set up a PIF file for some of the most popular DOS applications. When Windows is installed, it usually checks for existing DOS applications that it can create a PIF file for. So, in many instances, if the application was installed before Windows, that application already has a PIF file already. However, if you've added a DOS program since installing Windows, you can have Windows search and create a PIF file.

There are two options if you choose to Set up applications. The first is to search for a specific application, while the second allows you to search an entire drive for applications. If you choose to set up a specific application, a dialog will appear asking you for the application path and filename as well as the program group where you want to add the program icon. If you don't know the specific filename or path, choose the Browse button and select the directory and the filename you want to set up. After you choose OK, an icon will be created, and if you double-click on the icon, the PIF file will be run. Most major DOS applications can be set up this way.

If you've added a lot of DOS programs since you installed Windows, you can search an entire drive for DOS applications. When Windows finds an application, it adds it to the Applications group and creates an icon for it. If Windows is unsure what application or which version an executable is, it will ask you to choose from options it thinks it might be. Again, this works for most major DOS applications.

However, there are some applications that Windows can't recognize or run with the _DEFAULT.PIF. To find out if it will run using the defaults, open File Manager and double-click on the executable file. If it doesn't run correctly, Windows provides a PIF Editor icon in the Main group to create you own PIF files. If you've never edited or created a PIF file before, you may find it a bit troublesome at first. The best thing to do is load _DEFAULT.PIF and save it under a different filename so, you don't overwrite the way Windows runs other DOS programs.

You will notice a variety of options that you can include in your PIF. The first of which is the Program Filename. In this box, you should put the path and the program filename. For example: c:\dos\edit.com. The next box asks for the Window Title. In this box, you can put whatever you want the text to be under the icon. For example: DOS Editor. The third box asks for any optional parameters, if any. These would be anything that you would have to type after typing the filename. For example, if the program needed a /s parameter, you would type that into this box. And the fourth box asks for the Startup directory. For example: c:\dos.

The next options are dependent of the type of program you are trying to run. These include memory requirements, display size, and execution. The best way to handle these is to use the defaults. If they don't work, find out from the manufacturer, or in some cases, the side of the box the memory requirements of the program you're trying to run. If you still can't find out, there is a secret way to force Windows to allocate as much memory as necessary. Put a -1 in the memory boxes, and Windows will free up as much memory as it can. The disadvantage is that memory is not able to be used by Windows while the program is running. Sometimes a PIF file is installed by the DOS application in the directory where the application is installed. So, be sure to check there before trying to create your own.

Also, a word about DOS games and Windows. DON'T do it!!! Many DOS games use resources and memory that Windows wants to use. Also, many games need lots of conventional memory to run and recommend a separate boot disk. There may also be sound card conflicts and things of that sort, as well as a conflict with the Windows memory manager. So, in many instances, trying to run the more advanced DOS games under Windows is a very frustrating task, and I don't recommend it.

Although this article is hardly comprehensive, it should give some insight on running DOS applications under Windows. The best thing is to go with the defaults, and if they don't work, experiment with the PIF settings. Expect though, that things may not always work correctly and, at times, you may be forced to reboot the machine. However, with practice, even the most stubborn DOS applications can be made to run under Windows.


Richard Neff is a Microsoft Certified Professional, certified as a Systems Engineer with elective exams in Microsoft Mail and Systems Management Server (SMS). He is also a Product Specialist in Microsoft Excel 5.0 and Microsoft Word for Windows 2.0/6.0. He has a B.S. in Computer Science from VMI and has worked with personal computers for over 15 years. He is a contributing author to the books Windows NT 4.0 Installation and Configuration Handbook and Windows NT 4.0 Advanced Technical Reference, both published by Que Publishing. He has formed his own computer consulting company, Network Technologies Group, which specializes in Novell Netware, Microsoft Windows NT, and Microsoft BackOffice solutions. Network Technologies Group is located in Blacksburg, VA and also has a Web site at http://www.bnt.com/~netech/.

Back to the Unleashing Windows Index