There are situations when you need to pick a single file from a .msi package without going through the installation phase. One good example is that a stand-alone or portable application wrapped in a .msi package. Or, you may need to extract a particular wallpaper image from a theme installer.
In that case, you can avoid running the setup and extract the contents of the .msi package manually. Thus there won’t be a need for a System Restore point, the addition of several registry keys, and a few temporary directories (which would be the case if you run the setup).
No third-party tools are needed; you can do this using the Windows Installer executable
How to Extract the Contents of an .MSI File
I’ve got the ChristmasTheme .msi package downloaded from the Microsoft site and would like to extract the background wallpaper from the package.
To extract the package, use the following command-line example from the Run dialog or Command Prompt:
msiexec /a "d:\downloads\ChristmasTheme.msi" /qb TARGETDIR="d:\downloads\theme files"
And here it is!
And the wallpaper image I was looking for is this, located under the Web\Wallpaper folder.
To extract .msi file contents even easier, you can implement the command to your right-click context menu.
Adding “Extract All” Right-Click Option for .MSI Files
Download msi-extract-all-menu.zip, unzip and run the REG file included in the archive. This adds the “Extract All” option to the right-click menu for .msi files.
Clicking “Extract All” is all you need to do. It runs the msiexec.exe command-line in the background. The package contents will be extracted to a folder with the same name as the source file, appended by the word “Files” — e.g., “ChristmasTheme.msi Files”
Third-party tools to extract .MSI file contents
You can use 7-Zip, PeaZip, WinRar, or any other archive utility to view and extract the contents of .msi files.
LessMSI is another utility that can open and extract the contents of .msi files.
LessMSI also comes with a command-line tool (lessmsi.exe is CLI and lessmsi_gui.exe is the GUI version.)
LessMSI – Command-line example:
lessmsi x d:\downloads\ChristmasTheme.msi d:\downloads\theme\
The above command extracts the .msi file contents to the “d:\downloads\theme\” directory.
(However, if you need to extract via command-line, msiexec.exe will do the job for you, anyway. You don’t need LessMSI CLI for that purpose.)
You can download LessMSI from GitHub. The product’s home page is
UniExtract2 or “Universal Extractor 2” is a tool to extract files from any type of archive or installer.:
This tool is only a front-end that uses CLI binaries of different programs like 7-Zip, LesMSI, ARC, etc. The binaries are stored in the
(Last reviewed on May 29, 2021. The instructions apply to all versions of Windows, including Windows 10)
One small request: If you liked this post, please share this?One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!