|Internet media type|
|Magic number||0x4d 0x5a|
|Type of format||Executable (Binary machine code)|
|Container for||The main execution point of a computer program|
|Contained by||Microsoft Windows|
|Extended to||New Executable, Portable Executable, Linear Executable,W3, W4, DL, MP, P2, P3, etc.|
There are numerous file formats which may be used by a file with a .exe extension:
When a 16-bit or 32-bit Windows executable is run by Windows, execution starts at either the NE or the PE, and ignores the MZ code known as DOS stub. Started in DOS the stub typically displays a message "This program cannot be run in DOS mode" (or similar) before exiting cleanly, this thereby constituting a minimal form of fat binary. A few dual-mode programs (MZ-NE or MZ-PE) such as reg and older WinZIP self extractors include a more functional DOS section.
IExpress is Windows program that makes self-extracting .exe files. It uses self-extraction directive (.sed) files to extract files, optionally running an installation command. It supports package titles, confirmation prompts, license agreements, and post-install commands using an .inf file.
Besides these, there are also many custom EXE formats, including but not limited to W3 (a collection of LE files, only used in WIN386.EXE), W4 (a compressed collection of LE files, only used in VMM32.VXD), DL, MP, P2, P3 (last three used by Phar Lap extenders).