Wednesday, June 13, 2007

NTVDM encountered a hard error

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.

6 comments:

Anonymous said...

Thanks for the info. It fixed my issue today.

Ben said...

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

Anonymous said...

thanks! (server 2003)

Anonymous said...

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 ?

Anonymous said...

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

Anonymous said...

...."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

Post a Comment

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.