Extract Contents of .MSI File and Add “Extract All” to Right-Click Menu

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 msiexec.exe command-line.

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!

extract msi file contents command-line

And the wallpaper image I was looking for is this, located under the Web\Wallpaper folder.

chrismas theme wallpaper

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.

.msi extract all right-click menu

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

7-Zip

You can use 7-Zip, PeaZip, WinRar, or any other archive utility to view and extract the contents of .msi files.

extract msi file contents command-line

LessMSI

LessMSI is another utility that can open and extract the contents of .msi files.



extract msi file contents command-line - lessmsi

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 https://lessmsi.activescott.com/

UniExtract 2

UniExtract2 or “Universal Extractor 2” is a tool to extract files from any type of archive or installer.:

.msi uniextract 2

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 UniExtract\bin folder.

(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!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

Leave a Comment