LHA/LHarc self-extracting archive

LHA/LHarc self-extracting archive refers to the various self-extracting archive formats associated with the LHarc/LHA family of compressed archive utilities.

Refer to LHA for information about the underlying archive format.

This article primarily covers files for the DOS platform. (TODO: Other platforms.)

Note that some relatives of LHA, such as LArc and PMA, have self-extracting archive formats that are not covered here.

The usual manner of creating a self-extracting archive is to first create a normal (.LZH/.LHA) archive, then run the software on that non-executable archive using the " " function.

Format details
LHarc v1.x can create archives in either COM or EXE format. LHA v2.x only supports EXE format.

Starting with v1.12, EXE files can be structured in two different ways: "Small model" (the default), or "Large model". Large model is selected by using the  (v1.x) or   (v2.x) option.

Special filenames
If a self-extracting file contains a member file named "!", that file will be displayed as text prior to extraction, with a prompt to continue. The documentation names this feature "telop".
 * ! (versions ~1.13+)

If a self-extracting file contains a member file named "AUTOLARC.BAT", the BAT file will be executed after the files are extracted.
 * AUTOLARC.BAT (versions through ~1.12)

A self-extracting file can optionally be created such that, if the end user supplies a customizable keyword on the command line, a member file named "AUTOLARC.BAT" will be executed after the files are extracted.
 * AUTOLARC.BAT (1.x versions ~1.13+)

If a self-extracting file contains a member file named "!.BAT", and the end user uses the special " " or " " option, the BAT file will be executed after the files are extracted. ''[Ed. note: Or so says the documentation. Confirmation needed.]''
 * !.BAT (2.x versions)

Identification
LHarc/LHA self-extracting archives contain a text message that will be printed when the files are extracted, which could be useful for format identification. Unfortunately, the message is not consistently located or formatted.

An example of such a message is " ". It contains a version number (which may only be approximate), and usually an "S" or "L" suffix indicating Small or Large model.

The following table summarizes most of the DOS formats.

Software
Refer to LHA, especially the main LHarc/LHA software.