What is the MSI file format?
Files with the .msi extension store an application installation package or a driver package for Microsoft Windows. .msi files have a standardized structure defined by metadata and contain all resources needed to install an application. The name MSI comes from Microsoft Installer, the original name of the technology before Microsoft rebranded it Windows Installer.
MSI package structure
.msi packages are relational databases saved in the OLE2 Compound File Binary format - the same container used by legacy Office binary documents. Because of this shared container, the first eight magic bytes (D0 CF 11 E0 A1 B1 1A E1) are not unique to .msi; the format is distinguished by its internal database streams such as _Tables and _Columns. Each package is divided into:
- One or more products to be installed
- Product components - the atomic units of installation (files, registry keys, shortcuts)
- Features - larger hierarchical structures comprising components; users may choose optional features during setup
- Key paths for components - critical elements verified during component installation or uninstallation
Although a single installer may bundle multiple products, it cannot natively verify cross-product dependencies. Dependency management is handled by uninstaller tools or through the GUI. .msi remains the dominant installer format for enterprise and legacy Windows software.
Creating and using Windows Installer packages
.msi packages are authored with dedicated tools such as the WiX Toolset, Orca (included in the Windows SDK for inspecting and editing databases), or commercial authoring products. The installation process is driven by msiexec.exe and divided into three phases:
- User interface - users configure installation options
- Execution - the actual installation, running in either *immediate* or *deferred* (pending) mode
- Rollback - if installation fails, the transaction is rolled back and no system changes persist
Contents of an .msi package can be extracted without running the installer using 7-Zip or via msiexec /a (administrative install).
Versions of Windows Installer
.msi packages debuted with Office 2000 in 1999 (Windows Installer 1.0); the runtime was also built into Windows 2000. Version 5.0 shipped in 2009 alongside Windows 7 and Windows Server 2008 R2. Closely related formats include .msp (patch packages delivering binary diffs to installed products) and .mst transform files that modify installer behavior at runtime. The newer .msix standard, introduced in 2018, combines .msi, .appx, App-V, and ClickOnce technologies for improved security, sandboxing, and Store distribution - but .msi continues to be widely deployed for enterprise and traditional desktop software. Payload files inside an .msi are typically compressed as .cab streams embedded in the database.
Security & safety
RISK: MEDIUMAn MSI is a trusted-looking installer, which makes it a favoured malware disguise: attackers ship trojaned MSIs (often with malicious Custom Actions that run code during install) or fake "software updates". Install MSIs only from the official vendor site, and prefer signed packages - right-click > Properties > Digital Signatures shows the publisher; an unsigned MSI from an unknown source is a red flag. Because MSI runs with installer privileges, a malicious one can do anything an admin can. The rename/7-Zip trick lets you inspect contents before running.
Format details
in a nutshellPrograms that open MSI files
Technical details
deep spec| Container format | OLE2 Compound File Binary (CFBF) - same outer structure as legacy .doc and .xls binary Office files |
| Magic bytes (offset 0) | D0 CF 11 E0 A1 B1 1A E1 - OLE2 signature shared with other Compound Documents; not unique to MSI alone |
| MIME type | application/x-msi |
| Internal database tables | Fixed-schema relational tables including File, Registry, Component, Feature, Property, and CustomAction |
| Payload storage | Files compressed as Cabinet (.cab) streams embedded in the database or referenced as external .cab archives |
| Compression algorithms | Cabinet streams use LZX or MSZIP (zlib-compatible) compression |
| Transaction model | Full rollback on failure - all file and registry changes are undone via a shadow-copy scripting mechanism |
| Execution engine | msiexec.exe (built into Windows); install: /i, remove: /x {ProductCode}, repair: /f, admin extract: /a |
| Privilege model | Supports per-machine (elevated, ALLUSERS=1) and per-user (non-elevated) installation modes |
| Advertised installation | COM classes and shortcuts can be advertised - registered but not deployed until first use (demand-install) |
| Patch support | .msp patch files deliver binary diffs and supplemental table data targeting a specific MSI product code |
| Transform support | .mst transform files override property values and table data at install time without modifying the base .msi |
| Merge modules | .msm merge module packages encapsulate reusable components for inclusion in multiple .msi databases |
| Custom actions | Pre- and post-install logic can execute VBScript, JScript, DLL entry points, or external EXE processes |
| Uninstall registration | Automatically writes HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{ProductCode} entries |
| Runtime versions | Windows Installer 1.0 (1999) through 5.0 (2009, bundled with Windows 7 and Server 2008 R2) |
| Released | 2000 (Windows Installer 1.0, shipped with Office 2000 / Windows 2000) |
| Specification | learn.microsoft.com |
MSI conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about MSI files.