.fw files.wiki
EXE

EXE Files

Windows Executable Program

.EXE files are executable programs, most commonly Windows PE binaries launched by Windows or compatible runtimes.

Windows Portable Executable (PE) executable

Most common
Developer
Microsoft
Category
Executables & Packages
MIME type
application/vnd.microsoft.portable-executable
Format
Binary
Magic bytes
4D 5A
First released
1993
Latest version
PE/COFF as documented for Windows 11 / Visual Studio toolchains
Open standard
No

MS-DOS MZ executable

Developer
Microsoft
MIME type
application/x-msdos-program
Format
Binary
Magic bytes
4D 5A
First released
1981
Latest version
DOS MZ executable format
Open standard
No

New Executable (NE) 16-bit Windows/OS/2 executable

Developer
Microsoft and IBM
MIME type
application/x-msdownload
Format
Binary
Magic bytes
4D 5A
First released
1985
Latest version
Windows 3.x / OS/2 1.x NE
Open standard
No

Linear Executable (LE/LX) OS/2 executable

Developer
IBM and Microsoft
MIME type
application/x-msdownload
Format
Binary
Magic bytes
4D 5A
First released
1992
Latest version
OS/2 2.x LX/LE
Open standard
No

Online .EXE Text Viewer

Reading file…

What is a .EXE file?

.EXE is a program filename extension, but not of a specific file format. As a rule, on current Windows platforms, it stands for Microsoft Portable Executable format (application, console program, service, installer, self-extracting archive etc.). The mentioned Portable Executable was designed when Windows NT was created (1993). It comes from COFF formats and includes a machine code, import/export tables, resources, relocation information, digital signatures, and .NET metadata (for managed applications).

As for older files with EXE extension, they may be MS-DOS MZ executables that are supported under DOS environment, as well as the ones for Windows 98 and previous versions. They use MZ signature in their binary format, referring thus to a developer (Microsoft engineer) named Mark Zbikowski. Most 16-bit Windows applications (as well as OS/2 ones) use NE format that contains an MZ header in addition to New Executable header used by Windows 1.0,2.,3. and by OS/2 1.0.

Some files of type EXE are self-extracting archives and/or installers and are executable themselves but can have embedded payload (such as archive compressed into ZIP, 7z, CAB and even installer NSIS, Inno setup or MSI) that can be usually extracted by archive software. To recognize file types, use the presence of MZ signature, and of e_lfanew pointer in the beginning that for PE files points to PE\0\0, for NE - on NE, and LE and LX for some OS/2 linear formats respectively.

How to open a .EXE file

Open a .EXE file on Windows

  1. 1 Go to the folder with your file in File Explorer. Usually, downloaded files end up in Downloads.
  2. 2 Double-click your .EXE file if you have an app for .exe files on your computer. In case it does not open, move on to step three.
  3. 3 Right-click your .EXE file -> select Open with -> Choose another app.
  4. 4 Choose Microsoft Windows in the list (Windows 11: choose Always). For Windows 10 -> put a check on "Always use this app to open .exe files" and click OK.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for Windows

Open a .EXE file on macOS

  1. 1 In the Finder app, locate your .EXE file.
  2. 2 Just double-click your .EXE file in order to automatically launch the program which is connected with it.
  3. 3 Need another app on your Mac? Control-click the file (or right-click with a mouse). In the pop-up menu select Open With -> Wine.
  4. 4 If it isn't in the list, choose Other… and find the application manually.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for macOS

Open a .EXE file on Linux

  1. 1 Launch your file manager. Depending on the desktop it may be named Files (GNOME), Dolphin (KDE Plasma), Nemo (Cinnamon) or Thunar (Xfce).
  2. 2 Double-click the file.
  3. 3 Or choose another program by right-clicking the file -> Open With -> Wine.
  4. 4 Install Wine (if it is not installed on your computer) from the software centre, repository or Flathub.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for Linux

Open a .EXE file on iPhone / iPad

  1. 1 Use the Files app and go to On My iPhone, iCloud Drive or Downloads.
  2. 2 Tap the .EXE file you want to open.
  3. 3 If the file can be opened by a built-in iOS app (supported format), it opens automatically.
  4. 4 Touch and hold the file to get the context menu -> choose Share -> select a suitable app from the list of apps.
  5. 5 If there is no such option, download the app first from the App Store and then tap the document again.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for iPhone / iPad

Open a .EXE file online

  1. 1 Move to the online viewer at the top of this page.
  2. 2 Drag the file there or select it, and its contents will appear in your browser tab. The file is not uploaded.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for Online

More details about opening .EXE files

In Windows, the reliable executable is opened by a double click and is executed using the Windows loader. In order to view the details concerning the properties of such executable, right-click the file and then navigate to "Properties" to access the "General" tab and the "Digital Signatures" tab. However, for MS-DOS MZ program and 16-bit Windows NE program, 64-Bit Windows doesn't have its NTVDM and therefore an emulator or DOS box is used (DOSBox-X for example) or you may use Virtual Machines for this purpose.

On MACs or on Linux operating system, the executables in question can be successfully ran via Wine although it is not always possible because not all the programs and drivers may operate in Wine including anti-cheat systems, Microsoft Store apps, and DRM-protected games. For unknown or suspected program/file, do not try running it initially in order not to make harm. Instead, open the program using tools such as 7-Zip, PeaZip, or Ghidra which provides useful data such as metadata of files, resources, imports, packers' signatures. ILSpy is an effective tool to open managed .NET programs when CLR metadata is present. Moreover, if there is a possibility, you may extract C#. On an iOS platform, EXE does not work. UTM SE can host a DOS or Windows guest. On Android platform there is no EXE support either thus it would be wise to either remotely connect or employ a Virtual Machine or extraction.

Finally, if there is no success in double click, you must ensure whether the downloaded file is completed, whether the CPU and Windows version fit the requirements, whether a file extension is properly set, whether antivirus hasn't banned the file, and, finally, whether EXE in question is a container for an installator/patch.

Technical details

.EXE files are rarely in text form; almost all Windows variants use binary .exe starting with MZ 4D 5A at byte 0. In the MZ DOS executable file format header is e_lfanew (0x3c). This file pointer to the next format header normally points to the PE signature 50 45 00 00 in a PE executable image, followed by the COFF header, PE optional header and directories, and finally to sections. Typical sections are .text - code, .rdata for read-only data, .data - writable data and .rsrc for icons, dialogues and version. The image can optionally carry also overlay after last section (overlay - used by various installers and self-extracting packages).

The PE architecture defines executable target as, for instance, x86, x64, ARM etc., and subsystem defines whether GUI executable is meant, console, native etc. In optional headers there’s information like image base, entrypoint RVA, section alignment, file alignment, DLL flags like ASLR flag and DEP flag. Locations of imported data, exports table, TLS, relocation, Debug directories, Resources and Certificates tables in file are provided. Authenticode certificate (outside loaded image digest) uses certificate directory in optional table.

MS-DOS MZ executable files include a relocation table, header size information and initial code segments information, information of memory allocation as well. Modern 64bit Window doesn’t load NE (New Executable) files and LE/LX Linear Executable files, using the same DOS MZ executable header as base of format with additional modules table. Files .net.exe have PE format with additional clr header and metadata streams, usually containing code usually written in Common intermediate language (CIL), often along with metadata of this assembly and may also target anycpu platform or some specific platform type like x86, x64 or ARM. File may be few kilobytes in size or even hundreds of megabytes long. Common MIME type is application/vnd.microsoft.portable-executable.

How to convert .EXE files

There exists no simple method for losslessly reverting an .EXE executable into the equivalent of the source code, APK, DMG, or native applications for macOS or Linux; all of which will result in a best-effort attempt, or package re-construction at most.

Self-extraction can be easily handled using 7z x setup.exe -o./extracted, though there can be other types of payloads, such as CAB, ZIP, and 7Z inside the EXE executable file itself (as well as NSIS and/or Inno Setup setups), some of which 7-Zip software may successfully extract without running them.

.NET applications (which come with extensions .exe or .dll) may be decompiled into C# approximations using decompilers such as ILSpy and the ones made for dnSpy family. Disassembly, on the other hand, can only happen for the native PE executables with tools such as Ghidra, IDA Free and objdump, producing disassembly or pseudocode rather than a project file.

The Resource Hacker software is used to view various Windows resources from a file, namely extracting icons, dialog layouts, version info, manifest, bitmaps and various strings; in addition to having the capability of changing resources of a target file. GNU objcopy can dump a .text section to raw binary (though, one cannot convert a Windows EXE into ELF or Mach-O).

Convert toToolCommand / note
Extracted files/folder from a self-extracting EXE archive 7-Zip 7z x setup.exe -o./extracted Works for many installer and SFX EXEs because they contain an embedded archive; it does not decompile the program code.
Assembly listing (.asm/.txt) GNU objdump objdump -d -Mintel program.exe > program.asm Produces disassembly for supported PE/COFF binaries; symbols may be missing and source-level structure is not recovered.
C# project from a .NET EXE ILSpy command-line tool ilspycmd -p -o ./decompiled MyApp.exe Only useful for managed .NET assemblies; obfuscation, native code, comments, and original project files may be unrecoverable.
Icon resource (.ico) Resource Hacker ResourceHacker.exe -open app.exe -save app.ico -action extract -mask ICONGROUP,MAINICON, Extracts Windows icon resources when present; resource names vary, so MAINICON may need to be changed.
PE section dump / raw binary section GNU objcopy objcopy -O binary --only-section=.text program.exe program_text.bin Copies a selected section such as .text; the result is not a runnable executable.
Malware/static-analysis report Detect It Easy CLI diec program.exe Identifies PE type, compiler/packer signatures, subsystem, imports, and entropy; it is analysis output, not a functional conversion.

Common problems and fixes

"This app can’t run on your PC" is displayed when there is mismatch between processor architecture, a 16 bit MZ or NE executable launched on 64-bit versions of windows, when the target system is a lower or newer version than executable is built against and AppLocker, WDAC blocking it. Use Detect It Easy tool to analyze it and install x86, x64, ARM64 or legacy environment it was compiled under.

"The version of this file is not compatible with the version of Windows you’re running" typically applies for 16-bit DOS, Windows NE applications as well as for 64 bit binaries launched on 32-bit systems. Launch your 16-bit program inside DOSBox-X application or a virtual machine, while getting correct 32/64-bit binary on the site that offers it.

"Bad EXE format", error 193 and "%1 is not a valid Win32 application" typically indicate that the executable might be corrupt, a renamed non-EXE file, built for a different architecture or is missing the PE (Portable Executable) header, which indicates invalidness of it. Re-download it, compare with the hash given by publisher, ensure that its MZ prefix on the offset 0 is present.

"The application was unable to start correctly (0xc000007b)" is thrown when 32-bit DLLs is being used by a 64 bit program vice versa or Visual C++, DirectX runtimes are missing for the particular application. Install corresponding redistributables by downloading and reinstalling runtime provided by publisher as well as a corresponding application's build from the list of available versions.

SmartScreen displays that "Windows protected your PC" when an app was launched from some unsigned or less reputable location. Make sure that app has been published by legitimate developer and has got Authenticode certificate as well as a proper SHA256 hash and URL on which it had been offered from. Use options provided when prompted "run" or "more info". If it shows "NSIS Error"/"The setup files are corrupted" - download them once again on HTTPS URL.

Security considerations

EXE is an executable container that runs native Windows code, managed .NET code, setup program, and runtime-decompressed payloads from resources and overlays. Always treat a unexpected attachment or downloaded file as high risk. Make sure the file name, certificate (publisher), Authenticode sign, and URL where the file comes from were checked before running it. Having a valid authenticode digital signature only assures the authenticity of the product as well as the integrity at signing the program but not its safety, as a digital certificate may become compromised.

Malware often masquerades in packers, self-unpackers, fake executables icon, files with two extensions (invoice.pdf.exe format, for example). Opening such files in 7-Zip and hex editors (Hxd, for example), static binary analysis tools like Ghidra, free IDA Free (IDA) edition, or .Net parser like ILSpy is safer than just executing. Parsers could have flaws. A sandbox approach or disposable test machine, a virtual machine, like Windows Sandbox are good approaches here, especially if a user has admin rights on his desktop environment.

History and versions

MZ executable file format was created in 1981 as an improved version of plain COM file for Microsoft DOS operating system. It allowed using relocations and more elaborate memory maps, thus having two-letter MZ identifier that is related to Microsoft programmer Mark Zbikowski. Windows OS 1.0 and OS/2 1.x by Microsoft and IBM in the 1980s chose NE format to be used with GUI 16-bit executable files and DLLs. In the 90s with the advent of OS/2 2.0 and 32-bit linear memory address space IBM and Microsoft introduced LE/LX executables. These file types later were also available in some DOS extenders or legacy OS/2 products. Microsoft Windows NT 3.1 introduced the PE format in 1993, adapting COFF concepts for Windows executables and DLLs. Later PE32+ extended PE for 64-bit Windows on x64 and ARM64.

The 2002 .NET Framework reuse of PE files containing metadata of IL and CLR assemblies means that managed applications continue to use .dll/.exe extension of Windows binaries. Microsoft provides documentation for PE/COFF format; it is however not available as standard published by international organizations like ISO.

While DLL and many EXE files use the same PE format container, windows treat them as libraries, loaded via LoadLibrary API, and not as applications to run as separate tasks. The COM is a DOS executable file type, which does not use MZ Header format; it does not have a relocation table and uses 64-KB segmentation. It requires significantly fewer loading overheads, compared with the PE one. The .msi is Windows Installer's database format, which implies neither execution nor application. In many cases, a setup.exe is no more then bootstrapper to some MSI. Similarly, msix and appx files come as a set of deployment manifests and signed packages that is much less portable across different devices compared to raw installer .exe file. .bat/.cmd/.ps1/.vbs are interpreted script text files running on cmd.exe or scripting engine. While the ELF format is used as a primary executable file type in Linux/Unix OSs and Mach O in macOS/iOS environment. The scr screensavers under Microsoft windows are usually PE files with an altered extension.

Comments (0)

Replying to

No comments yet. Be the first to share your experience with this file type.