"Packed File Corrupt" Error Message

This article was previously published under Q72360
This article has been archived. It is offered "as is" and will no longer be updated.
Running an .EXE file that has been "packed" using the EXEPACK utility orthe /EXEPACK linker option may result in the following error message eventhough the packed file is intact:
Packed file corrupt
This behavior is a result of an error in the code that unpacks the.EXE file. You can determine if this is the cause of your problem bystarting a new copy of COMMAND.COM. To do this, type command at the MS-DOS prompt and press ENTER.(It may be necessary to repeat this several times.) Then try to runyour program.

NOTE: This error is more likely to occur with MS-DOS version 5.0 andlater because it is capable of freeing up more conventional memory.
If the method above is successful, you may resolve the problem in amore permanent fashion by increasing the FILES and BUFFERS in yourCONFIG.SYS file.

If you are running MS-DOS 5.0 or later, you can resolve this problem byloading MS-DOS low (by adding the DOS=LOW command to the CONFIG.SYS file)or by using LOADFIX. LOADFIX ensures that a program is loaded above thefirst 64K of conventional memory. For example, to ensure that a programfile named TEST.EXE is loaded above 64K, type the following:
loadfix test.exe
For more information on LOADFIX, see the version 5.0 "Microsoft MS-DOSGetting Started" guide. Or, if you are using version 6.0 or 6.2, type thefollowing at the MS-DOS command prompt:
More information
This problem occurs because of a problem in the EXEPACK.EXE utilityand the LINK.EXE linker utility when the /EXEPACK switch is used. Eachwill cause the executable file to be compressed or packed by removingrepeating sequences of identical bytes, allowing the program to occupyless disk space. The program will then load for execution morequickly.

Because of an error in the unpacking algorithm, the error message"Packed file corrupt" may occur when the packed program is loaded intomemory before the first 64K boundary. By spawning additional copies ofCOMMAND.COM or increasing your FILES and BUFFERS sizes, you willincrease the amount of space MS-DOS occupies in memory. This forcesthe program to load above the first 64K boundary. This problem wascorrected in version 5.1 of the linker.

This error message may also result if the EXEPACK utility is fooledinto creating a packed file with the same name as the .EXE file. Forexample, if the current directory is C:\BIN and you type the following(the syntax for EXEPACK is "EXEPACK <exe_file> <packed_file>"), theresulting packed file will probably be corrupt:
   exepack c:\bin\test.exe test.exe				
More information on EXEPACK.EXE and LINK.EXE can be found in the "TheMS-DOS Encyclopedia," published by Microsoft Press.
6.22 2.11 3.20 3.21 3.30 3.30a 4.00 4.01 4.01a LOAD FIX online help 5.00 5.00a 6.00 6.20 6.21 "Packed File is Corrupt"

Article ID: 72360 - Last Review: 10/26/2013 11:23:00 - Revision: 3.0

Microsoft MS-DOS 4.0 Standard Edition, Microsoft MS-DOS 5.0 Standard Edition, Microsoft MS-DOS 6.0 Standard Edition, Microsoft MS-DOS 6.2 Standard Edition, Microsoft MS-DOS 6.21 Standard Edition, Microsoft MS-DOS 6.22 Standard Edition

  • kbnosurvey kbarchive KB72360