Problems with 16bit apps in Windows NT?

Here are some reasons for having problems with 16bit applications:

1. The PATH variable is too long or has an entry pointing to the WINDOWS or WINDOW/SYSTEM directories of a Windows 3.x or Windows 95 installation. This would be in either Control Panel / System / Environment or the AUTOEXEC.BAT. See tip 021.

2. The COMMAND.COM used by Windows NT is missing, damaged or replaced by another version. Repair System files and re-apply your latest Service Pack.

3. The VER.DLL file in the %systemroot%\system or %systemroot%\system32 directories is corrupted or replaced by an invalid version.

4. SHARE.EXE (or VSHARE) is being loaded in an %systemroot%\system32\AUTOEXEC.NT.

5. Insufficent environment space, see tip 047.

6. Check %systemroot%\system32\CONFIG.NT, here is mine:

dos=high, umb
shell=%systemroot%\system32\ /p /e:4096

7. Corruption of the WOW sub-system files. Repair System files and re-apply your latest Service Pack.

8. Make sure the following files are from your latest SP or NT CD, whichever is later:



Troubleshooting NTVDM and WOW startup problems.

In tip 0151, tip 1238, and tip 1227, we described possible causes of 16-bit application troubles.

Additional troubleshooting steps you can take to resolve these problems are:

1. Run %SystemRoot%\System32\Sysedit.exe. If this application starts correctly, both NTVDM and WOW are functioning correctly.

2. If %SystemRoot%\System32\Sysedit.exe does not start correctly, at a CMD prompt, type If does not start correctly, see step 5. If starts, type If does not start correctly, see step 5.

3. If your DOS program requires EMS memory, see Q99279 and upgrade to SP5 (or greater).

4. If your program reuires additional conventional memory, see Q99363.

5. Verify your SystemRoot%\Win.ini and SystemRoot%\System.ini are correct or expand them from the CD-ROM.

6. If you make any changes, use Task Manager / Processes to kill NTVDM and start at step 1.

7. Check your environment variables by typing SET at a CMD prompt.

8. The last step is to run a repair, repairing files. Then re-apply your latest service pack.


How does Windows NT locate .DLL files?

Windows NT uses different approaches for 32-bit versus 16-bit apps.

For 32-bit apps, Windows NT searches for implicitly loaded DLLs at:

The .exe file directory.
The current directory.
The %SystemRoot%\SYSTEM32 directory.
The %SystemRoot% directory.
The directories in your Path.

If the DLL is listed as a KnownDLLs at HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager as a type REG_SZ entry with a Value Name of the DLL without the extension and a data value of the DLL with the .DLL extension, then the search is:

The %SystemRoot%\SYSTEM32 directory.
The .exe file directory.
The current directory.
The %SystemRoot% directory.
The directories in your Path.

The KnownDLLs are mapped at boot time. Rernaming or moving during a session has no effect.

You can alter this behavior by including the 8.3 DLL name in the ExcludeFromKnownDlls entry, a type REG_MULTI_SZ value, one per line. This will make NT believe that the DLL is not listed in KnownDLLs.

For 16-bit apps, Windows NT uses KnownDLLs for both implicitly and explicitly load DLLs. The value is at HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\WOW. At this key, KnownDLLs is a type REG_SZ value which lists the 8.3 DLL names, seperated by spaces. Wihout a KnownDLLs entry, WOW searches:

The current directory.
The %SystemRoot% directory.
The %SystemRoot%\SYSTEM directory.
The %SystemRoot%\SYSTEM32 directory.
The .exe file directory.
The directories in your Path.

With the KnownDLLs entry, WOW only searches the %SystemRoot%\SYSTEM32 directory.


You can't run an applications setup?

Many setup programs are 16-bit programs.

If you have tried tips 0151 and 1227, you may have a missing 16-bit KnownDLLs.

Use Regedt32 to navigate to:


If a file listed in KnownDLLs is missing from the %SystemRoot%\System32 folder, either extract it from the CD-ROM (expand), from your latest service pack (ServicePackFileName.exe /x), or copy it from another Windows NT that is running your service pack level.

NOTE: You may want to use Registry / Print Subtree to get a list of the KnownDLLs.

Sample:    expand <CD-ROM:>\i386\system.dr_ %SystemRoot%\System32\system.drv

You MUST reboot your Windows NT computer.

NOTE: If you used the Windows NT CD-ROM, you MUST reapply your latest service pack.

NOTE: You should also verify that Wowexec.exe and Gdi.exe exists in the %SystemRoot%\System32 folder.


16-bit app hangs and NTVDM consumes 100% of the CPU?

If this is your problems, the path is too long.

In additions to the steps decribed in tip 0151:

1. You must have at least RX permissions on %SystemRoot%\System32 and it's sub-folders.

2. Shorten the path, if any, in AUTOEXEC.NT.

3. Terminate NTVDM using Task Manager / Processes