Jump to content

.exe: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m Reverted 1 edit by 67.199.251.132 (talk) to last revision by Backendbar
Tags: Reverted references removed
Line 26: Line 26:
=== {{anchor|MZ|NE}}DOS ===
=== {{anchor|MZ|NE}}DOS ===
{{Main|DOS MZ executable}}
{{Main|DOS MZ executable}}
ASDgsdgDgDG

;16-bit DOS MZ executable:The original DOS executable file format. These formats can be identified by the letters "MZ" at the beginning of the file in ASCII. All later formats have an MZ [[DOS stub]] header.{{citation needed|date=March 2020}}
;16-bit DOS MZ executable:The original DOS executable file format. These formats can be identified by the letters "MZ" at the beginning of the file in ASCII. All later formats have an MZ [[DOS stub]] header.{{citation needed|date=March 2020}}
;16-bit New Executable: Introduced with thDZg
;16-bit New Executable: Introduced with the multitasking [[MS-DOS 4.0 (multitasking)|MS-DOS 4.0]] and also used by 16-bit [[OS/2]] and Windows, [[New Executable|NE]] can be identified by the "NE" in ASCII.
=== OS/2 ===ZDG

=== OS/2 ===
{{anchor|LX|LE}}
{{anchor|LX|LE}}
<!-- In addition to the anchors, the OS/2 section title is also linked to from redirects -->
<!-- In addition to the anchors, the OS/2 section title is also linked to from redirects -->
Line 39: Line 38:
{{anchor|PE|PE32+}}
{{anchor|PE|PE32+}}
{{Main|Portable Executable}}
{{Main|Portable Executable}}
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]].<ref>{{cite web|title=/STUB (MS-DOS Stub File Name) Linux/Mac cannot run an exe file.|url=https://msdn.microsoft.com/en-us/library/7z0585h5.aspx|work=[[MSDN]]|publisher=[[Microsoft]]|access-date=10 January 2014}}</ref><ref>{{cite web |url=http://thestarman.pcministry.com/asm/debug/DOSstub.htm |title=DOS Stub Program |website=The Starman's Realm |publisher=[[WP:SPS|Self-published]] |first=Daniel B. |last=Sedory |date=2004-10-12 |access-date=2014-01-10}}{{self-published source|date=January 2014}}</ref> 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 [[Windows Registry|regedit]]<ref>{{cite web|title=Using Registry Editor in Real Mode|url=http://support.microsoft.com/kb/131352|work=Support|publisher=[[Microsoft]]|access-date=10 January 2014|date=15 November 2006|archive-url=https://web.archive.org/web/20140115050101/http://support.microsoft.com/kb/131352|archive-date=15 January 2014}}</ref> and older WinZIP self extractors include a more functional DOS section.<ref>{{cite web|url=http://purl.net/xyzzy/dos/dostub.htm|title=dostub.exe|first=Frank |last=Ellermann|website=Purl.net|date=2014-01-22|access-date=2014-01-24}}</ref>
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]].<ref>{{cite web|title=/STUB (MS-DOS Stub File Name)DZGZD A few dual-mode programs (MZ-NE or MZ-PE) such as [[Windows Registry|regedit]]<ref>{{cite web|tDZgZDgDg with Windows NT, these can be identified by the "PE" in ASCII (although not at the beginning; these files also begin with "MZ").<ref>{{Cite web |url=https://msdn.microsoft.com/en-us/windows/hardware/gg463119.aspx |title=PE Format |website=Windows Dev Center |publisher=Microsoft |date=25 August 2019}}</ref>
;32-bit [[Portable Executable]]: Introduced with Windows NT, these can be identified by the "PE" in ASCII (although not at the beginning; these files also begin with "MZ").<ref>{{Cite web |url=https://msdn.microsoft.com/en-us/windows/hardware/gg463119.aspx |title=PE Format |website=Windows Dev Center |publisher=Microsoft |date=25 August 2019}}</ref>
;64-bit Portable Executable (PE32+): Introduced by 64-bit versions of Windows, this is a PE file with wider fields. In most cases, code can be written to simply work as either a 32 or 64-bit PE file.<ref>{{Cite journal |url=https://msdn.microsoft.com/en-us/magazine/bb985992(printer).aspx|title=An In-Depth Look into the Win32 Portable Executable File Format |journal=[[MSDN#Magazine|MSDN Magazine]] |publisher=[[Microsoft]] |date=February 2002 |first=Matt |last=Pietrek |author-link=Matt Pietrek}}</ref>
;64-bit Portable Executable (PE32+): Introduced by 64-bit versions of Windows, this is a PE file with wider fields. In most cases, code can be written to simply work as either a 32 or 64-bit PE file.<ref>{{Cite journal |url=https://msdn.microsoft.com/en-us/magazine/bb985992(printer).aspx|title=An In-Depth Look into the Win32 Portable Executable File Format |journal=[[MSDN#Magazine|MSDN Magazine]] |publisher=[[Microsoft]] |date=February 2002 |first=Matt |last=Pietrek |author-link=Matt Pietrek}}</ref>



Revision as of 13:53, 7 June 2022

Windows Executable File
Filename extension
.exe
Internet media type
application/vnd.microsoft.portable-executable
Magic number0x4d 0x5a
Developed byMicrosoft
Type of formatExecutable (Binary machine code)
Container forThe main execution point of a computer program
Contained byMicrosoft Windows
Extended toNew Executable, Portable Executable, Linear Executable,W3, W4, DL, MP, P2, P3, etc.
Open format?No

.exe is a common filename extension denoting an executable file (the main execution point of a computer program) for Microsoft Windows.[1]

File formats

There are numerous file formats which may be used by a file with a .exe extension:

DOS

ASDgsdgDgDG

16-bit DOS MZ executable
The original DOS executable file format. These formats can be identified by the letters "MZ" at the beginning of the file in ASCII. All later formats have an MZ DOS stub header.[citation needed]
16-bit New Executable
Introduced with thDZg

=== OS/2 ===ZDG

32-bit Linear Executable
Introduced with OS/2 2.0, these can be identified by the "LX" in ASCII. These can only be run by OS/2 2.0 and higher.[2] They are also used by some DOS extenders.
Mixed 16/32-bit Linear Executable
Introduced with OS/2 2.0, these can be identified by the "LE" in ASCII. This format is used for VxD drivers under Windows 3.x, OS/2, and Windows 9x; it is also used by some DOS extenders.[citation needed]

Windows

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.Cite error: A <ref> tag is missing the closing </ref> (see the help page).

64-bit Portable Executable (PE32+)
Introduced by 64-bit versions of Windows, this is a PE file with wider fields. In most cases, code can be written to simply work as either a 32 or 64-bit PE file.[3]

IExpress

IExpress is a 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.[4]

Other

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).[5]

See also

References

  1. ^ ".EXE File Extension". FileInfo - The File Extensions Database. Sharpened Productions. Retrieved 2019-08-16.
  2. ^ "OS/2 Operating System". operating system documentation project. 2004-04-03. Retrieved 2014-02-13.
  3. ^ Pietrek, Matt (February 2002). "An In-Depth Look into the Win32 Portable Executable File Format". MSDN Magazine. Microsoft.
  4. ^ "IExpress Wizard". www.mdgx.com. Retrieved 2021-12-25.
  5. ^ Brown, Ralf (2000-07-16). "Int 21/AH=4Bh". Ralf Brown's Interrupt List. Retrieved 2018-10-30.

Further reading

External links