Monitoring MS-DOS Applications

In Windows NT 4.0, each MS-DOS application runs in its own NTVDM process, eliminating some of the problems encountered in Win16 applications. Unfortunately, all of the NTVDM processes are called Ndvdm.exe by default, but you can change that.

To create a new process name for an NTVDM

  1. Copy Ntvdm.exe to a file with a different name.
  1. Edit the Registry by using a Registry editor. Regedt32.exe and Regedit.exe are installed when you install Windows NT.

Subtree

HKEY_LOCAL_MACHINE

Key

\System\CurrentControlSet\Control\WOW

Name

cmdline

Type

REG_DWORD

Values

%SystemRoot%\system32\ntvdm.exe


  1. Double-click the cmdline value entry to change ntvdm.exe to the name of your copy of Ntvdm.exe. When you start an MS-DOS application, it will run in a process with that name.

Tip

You don't have to restart the computer for the registry change to take effect. Thus, you can change the registry between starting different DOS applications and have each start in a uniquely named process. It is also prudent to set it back to Ntvdm.exe when you are finished.

Unfortunately, this doesn't work with 16-bit Windows applications, so you need to distinguish those by thread or by process ID.