NTVDM encountered a hard error

Wednesday, June 13, 2007
I ran across this one today when trying to run a 16-bit application on a Windows 2003 Server. I run the app and it pops up a Windows dialog box saying, "System Error : NTVDM encountered a hard error."

Turns out that the environment path for "TEMP" and "TMP" is invalid. Normally these paths resolve to their 8.3 pathname, so an enviromental variable set to %USERPROFILE%\Local Settings\Temp will resolve to C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp. On my problem server the path resolves to C:\DOCUME~1\ADMINI~1\Local Settings\Temp, note the space in Local Settings. This mix of long filenames and 8.3 names is invalid.

To resolve the issue, I changed the user TEMP and TMP variables to use C:\TEMP.

10 comments:

  1. Thanks for the info. It fixed my issue today.

    ReplyDelete
  2. Thanks. This was very helpful. I had eliminated the other causes. -BenT

    ReplyDelete
  3. thanks! (server 2003)

    ReplyDelete
  4. great one Jeff! worked for me as well....now I do not get the "ntvdm hard error" , but now the command prompt says...."could not execute xyz.exe"....any clues ?

    ReplyDelete
  5. Wow....worked like a charm thanks Jeff.....

    ReplyDelete
  6. ...."could not execute xyz.exe"....

    the file path name is proablly still too long..you need to move the install file closer to the root of C:


    for example: C:\TEMP\setup.exe

    instead of

    C:\documents and settings\username\desktop\folder\setup.exe

    ReplyDelete
  7. We had this hard error message when trying to print from a 16 bit program ... turned out to be the wrong printer set as the default. The printer set as default was no longer on the domain...

    ReplyDelete
  8. I just solved one another variant of this problem. I used ProcessMonitor to find suspicios actions and the steps vere these:
    1.,In registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\VirtualDeviceDrivers there was a reference to virtual drive driver "rnbovdd.dll". This file was not on the drive => clear the value in regedit. This was probably the biggest problem.

    2., In C:\Windows\Fonts the files vga852.fon, vgafixe.fon and vgasyse.fon were missing they are referenced from registry HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize. Microsoft says, these files should be in dllcache so I copied them there too. See http://technet.microsoft.com/en-us/library/cc939631.aspx
    3., The Path in Environment variables contained one non existing path. This was probably not the major problem, but still I fixed this.

    ReplyDelete
  9. Thank you for this! I was at a dead end trying to get VB 6 installed on some new servers. This fixed it. It is strange that this doesn't affect the Windows XP boxes. Oh well, I changed the "Local Settings" to "locals~1" and things are great now.

    Thanks for sharing! ^_^

    ReplyDelete

Thank you for your comment! It is my hope that you find the information here useful. Let others know if this post helped you out, or if you have a comment or further information.