Troubleshooting MS-DOS-Based Programs in Windows

This article was previously published under Q165214
This article has been archived. It is offered "as is" and will no longer be updated.
For a Microsoft Windows XP version of this article, see 314106.
This article describes how to troubleshoot MS-DOS-based program problems in Windows.

Test the Ntvdm Subsystem

The first thing to test when you are having problems with MS-DOS-based programs is the Windows Virtual Dos Machine (NTVDM) subsystem. You can use to test whether the NTVDM subsystem is running properly. You can start by performing the following steps:
  1. Click the Start button, and then click Run.
  2. In the Open box, type, and then click OK.
This should start a command prompt window. If this does not work properly, there is a problem with the NTVDM subsystem and you should check the following items:
  • Check the Config.nt and Autoexec.nt files in the %SystemRoot%\System32 folder for non-standard settings.

    Using a REM statement, remark out all entries *except* the following default entries:
          Config.nt      ---------      dos=high, umb      device=%SystemRoot%\system32\himem.sys      files=20      Autoexec.nt      -----------      lh %SystemRoot%\system32\mscdexnt.exe      lh %SystemRoot%\system32\redir      lh %SystemRoot%\system32\dosx      lh %SystemRoot%\system32\nw16 (only if CSNW is installed)      lh %SystemRoot%\system32\vwipxspx (only if CSNW is installed)						

    NOTE: Another way to accomplish this is to expand Autoexec.nt_ and Config.nt_ from the Windows CD-ROM disc to the %SystemRoot%\SYSTEM32 folder.
  • Close all other running programs. This can be accomplished by running Task Manager, closing all running programs, and making sure that there are no other NTVDM processes running. To start Task Manager, press CTRL+SHIFT+ESC.
  • Prevent all programs from running at Startup. Programs can run from three places at startup: the Startup groups, the Run and Runonce lines in the registry, and the "run=" and "load=" lines in the Win.ini file. You can check these places as follows:
    • The Startup groups are folders on the local hard disk that are in the following locations:
      • %SystemRoot%\Profiles\user_name\Start menu\Programs
      • %SystemRoot%\Profiles\Default user\Start menu\Programs

    • The Run and Runonce lines can be found in the registry under the following registry key:
    • You can edit the Win.ini file using Notepad. It is in the %SystemRoot% folder.
  • Verify the NTVDM system files in the %SystemRoot%\System32 folder. Check the following files and make sure they are the correct version by checking the size and date:
          Ntio.sys      Ntdos.sys      Ntvdm.exe      Ntvdm.dll (Windows NT 3.1 only)      Redir.exe						
  • The registry entries associated with the NTVDM subsystem are:
    • HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment
      This key stores the environment variables from the Config.sys and Autoexec.bat files for use in Windows.
    • HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ VirtualDeviceDrivers
      This key stores the device drivers to be used in a NTVDM session. These entries are created by Windows Setup when a device driver is installed.

Program-Specific Issues

The following functions do not work in Windows:
  • All MS-DOS functions except task-switching APIs (program programming interface functions) are supported.
  • Block mode device drivers are not supported. (Block devices are not supported, so MS-DOS IOCTL APIs that deal with block devices and SETDPB functions are not supported.)
  • Interrupt 10 function 1A returns 0; all other functions are passed to read-only memory (ROM).
  • Interrupt 13 calls that deal with prohibited disk access are not supported.
  • Interrupt 18 (ROM BASIC) generates a message that says ROM BASIC is not supported.
  • Interrupt 19 will not reboot the computer, but will cleanly terminate the current virtual DOS machine (VDM).
  • Interrupt 2F dealing with the DOSKEY program call outs (AX = 4800) is not supported.
  • Microsoft CD-ROM Extensions (MSCDEX) functions 2, 3, 4, 5, 8, E, and F are not supported.
  • The 16-bit Windows subsystem on an x86 computer supports enhanced mode programs; it does not, however, support 16-bit VxDs (virtual device drivers). The subsystem on a non-x86 computer emulates the Intel 40486 instruction set, which lets the computer run Enhanced-mode programs, such as Microsoft Visual Basic, on RISC computers.
This means that Windows does not support 16-bit programs that require unrestricted access to hardware. If your program requires this, it will not work in Windows NT or Windows 2000.

You should next check to see if the Autoexec.nt and Config.nt file settings are correct. Always try the default settings listed above. Some programs require special settings or drivers to run in the Config.sys or Autoexec.bat file. If this is the case, there are two options for initializing these files when starting your program:
  • Enter these lines in the Config.nt and Autoexec.nt files in the %SystemRoot%\System32 folder.
  • Create new Config and Autoexec files to be run when starting this program. To do so, follow these steps:
    1. Create the files and save them with the extension .nt in a folder other than %SystemRoot%\System32 (these files are usually saved in the same folder as the program.
    2. Right-click the desktop, point to New, and then click Shortcut.
    3. In the Command Line box, type the full path to the file you want to run, and then click Next.
    4. In the "Select a name for the shortcut" box, type the name for the shortcut, and then click Finish. This creates a new shortcut on the desktop.
    5. Right-click the new shortcut, and then click Properties.
    6. On the Program tab, click Windows. This opens a dialog box for the path to the Autoexec and Config files.
    7. Type the full path to the files you created, and then click OK in both dialog boxes.
    Every time this icon is started, it runs the Autoexec and Config files specified for the program. These settings are subject to the same restrictions as listed for MS-DOS-based programs.
There are other settings in a program's properties. If your program is not working properly, you may want to check all the tabs and make sure that the program settings are set to the manufacturer's specification. If the program is still not working, the vendor of the program should be contacted to see if the program is supported under Windows.

For additional information, please see the following articles in the Microsoft Knowledge Base:
ARTICLE-ID: 171940
TITLE : MS-DOS Application I/O Operations Cause Floppy Drive Access

ARTICLE-ID: 102418
TITLE : NTVDM Error: There Is No Disk in the Drive

ARTICLE-ID: 156687
TITLE : Entries in CONFIG.NT or AUTOEXEC.NT May Cause NTVDM Errors

ARTICLE-ID: 142026
TITLE : Err: "Hidden Console of WOW VDM" Running 16-bit or DOS App
For additional information about printing in an MS-DOS-based program, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: 163551
TITLE : Troubleshooting Printing Problems in Windows
apps msdos application

ID articol: 165214 - Ultima examinare: 12/04/2015 16:34:03 - Revizie: 3.2

Microsoft Windows 2000 Server, Microsoft Windows 2000 Advanced Server, Microsoft Windows 2000 Professional Edition, Microsoft Windows 2000 Datacenter Server, Microsoft Windows NT Server 4.0 Standard Edition, Microsoft Windows NT Workstation 4.0 Developer Edition

  • kbnosurvey kbarchive KB165214