Friendly Error Messages

I just accidently gave .EXE extension to a file that was actually a .ZIP archive and tried to run it on Windows 7. What error do I get? Lo and behold:

The version of this file is not compatible with the version of Windows you’re running. Check your computer’s system information to see whether you need an x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.

Needless to say, this “program” won’t run on 32-bit, 64-bit or even 56-bit Windows. Because it is not a program at all, it’s a ZIP archive. The error message sent me searching in a completely wrong direction.

I would rather have the message honestly tell me what happened (invalid executable format), and only then elaborate on a list of typical reasons for this debacle. I wonder what is the error message in Windows 8.1 (note to self: download it from MSDN).

This reminds me of the days when ERROR_NOT_SUPPORTED came out with the text like “This call is not implemented on Windows 95, it only works on Windows NT”, which looked especially funny when you were running NT.

PS. It is even funnier on 32-bit windows. Check it out, it interprets misnamed EXE as a COM file and actually starts to execute it! If it is less than 64K in size of course. Otherwise you get “program too big to fit in memory” error, but only when running it from cmd.exe. Things we do for backward compatibility…

Leave a Reply

Your email address will not be published. Required fields are marked *