There are several ways to install software and also a number of different solutions to create the setup file for end users to get the product installed. Inno Setup, InstallShield, and Nullsoft Scriptable Install System (NSIS) are applications that help create a setup installer, another is Microsoft’s own Windows Installer. Windows Installer files are known as MSI files because of the file extension.
Windows Installer files are used extensively by Microsoft for updating and installing Windows and other related software. They also have issues such as MSI files not being usable in Safe Mode. Software components for Windows Installer are integrated into Windows as standard and MSI packages can be used by system administrators and over networks for remote installations.
An MSI file is often embedded inside an executable setup installer so its usage is invisible to the end user. Sometimes, even when a program might not need installation because there’s only a few files, an MSI installer is used. If you are having issues installing a software package as an MSI file or want to get at the files inside, perhaps to make a program portable, there are ways to do it.
Here we show you 6 solutions for viewing or extracting the contents of MSI install packages.
View and Extract MSI Files with an Archiver
Although an MSI installer file is more like a database than an archive, some archiving software can still read and extract its contents. Do note that this option is likely to be the least reliable option. Archivers are not as effective as other tools but they’re very useful programs to have installed anyway.
Probably the most popular free archiving utility, 7-Zip, is able to read and extract the contents of many MSI files. As it behaves just like any other readable archive, you can simply right click on the file and choose 7-Zip > Open archive to open the MSI file for viewing.
With the 7-Zip window open, it’s easy to extract the whole MSI or individual files/folders by dragging and dropping them from the window or using the Extract button. You can also do similar with the 7-Zip > Extract context menu commands and extract the whole contents of the installer to a folder.
Other free archiving software such as Bandizip and Peazip or paid offerings like WinRAR and PowerArchiver can also open MSI installer files. In general, they don’t really show or allow you to extract anything differently to 7-Zip, apart from WinRAR. We found WinRAR could open and extract from some MSI files that other archivers couldn’t.
View an MSI and Extract Files With a Dedicated Tool
A specialist tool to extract the contents of windows Installer files should be the most effective and give the best results. Here we look at some dedicated MSI extractors, all are portable and don’t require installation.
A portable and free utility designed specifically for the task of viewing and extracting files from MSI installer packages is LessMSI (a.k.a. Less MSIérables). In addition to extracting files, the program also has some additional tabs to view the data tables from the package and to view the summary information stored inside the package (dates, languages, version numbers, publisher, and etc).
Browse or drop an MSI installer onto the window and the contents will be shown. All files can be selected for extraction or you can multi select with the mouse and the Shift/Ctrl keys. We found LessMSI very effective at reading and extracting more tricky MSI files where other options occasionally failed to read the whole contents. An option to add/remove right click context menu entries to Explorer for Extract and Explore is in Edit > Preferences.
Also included in the zip archive is a command line version of LessMSI so you can extract an installer from Command Prompt or a script. The syntax is very straightforward.
Lessmsi x msifile outputpath
There are a few other arguments available but they are not related to extracting the MSI file.
MSI Unpacker by JSWare
JSWare make a few useful MSI related tools to aid in their viewing and unpacking. In addition to the MSI Unpacker tool portable executable mentioned here, they also have an HTA webpage based script and also a VBScript which is used as one of the options in Universal Extractor. Simply run the program and drop an MSI onto the window or click the button to browse for a file.
Pressing “Get Installer info” will populate the bottom pane with all the names and file versions inside the MSI, “Unpack Installer file” extracts all the files to the default or a custom chosen folder. As MSI packages can add to or edit the system registry, the “Show Registry Settings” button will display a list of all registry entries that would be affected by a real install. The list of registry entries or files can be copied to the clipboard from the right click context menu or Edit menu.
The MSITools program is used for real time logging, setting command line arguments for MSI files, and for extracting files from MSI installers. Although the user interface looks rather busy and complicated, you don’t really need to pay attention to most of it because the extract files function only needs a few mouse clicks.
Drag a file onto the file input box under “Package Actions” or manually browse for the file. Then simply click the Extract Files button on the right, browse for an output folder and click OK to extract all files. If you want to selectively extract files, click the Files tab after opening the MSI file. From there, you can select/deselect all files at once or select individual files using the provided checkboxes.
Universal Extractor 2
Universal Extractor is a tool we’ve mentioned many times before because it’s great for unpacking many different types of files. It can also unpack installers including NSIS, InstallShield, Inno Setup, and Windows installer (MSI). Universal Extractor 2 is an open source and more up to date fork of the original version, which hasn’t been updated for several years.
Unpack an MSI file by using the right click menu entry or drop the file onto the main window. If it cannot automatically extract the file, a prompt pops up with three extract methods; MsiX extraction (Microsoft command line tool), MSI TC Packer extraction (Total Commander plugin), and JSWare unpacker Extension (One-click MSI Unpacker script from JSWare).
If the selected method does not seem to work, simply run Universal Extractor again and select an alternative method. Note that Universal Extractor only extracts all the files in an MSI package and doesn’t allow you to view what is inside it first.
Extract an MSI File Using the Command Line
Because Windows Installer files are built to allow silent and administrative installs, it makes sense to have a good command line interface. Windows has the ability to allow the MSI file contents to be extracted using the Command Prompt or via a script. Simply open a Command Prompt or press the Win key and type msiexec to get a list of arguments.
Thankfully the syntax to unpack an MSI file is pretty simple, the following can be inserted into the Run (Win+R) box, Command Prompt, or your own script.
msiexec /a pathtoMSIfile /qb TARGETDIR=pathtotargetfolder
Make sure to use a full path or an environment variable for the target folder or the process will fail. The “/qb” argument tells the installer to display a simple progress UI while unpacking. If you wish to make the process completely silent use “/qn” instead.
If you find yourself needing to extract MSI files fairly regularly, it’s easy to add an entry into the Windows Explorer context menu so you can extract the file with a couple of mouse clicks. Download and open the Zip file below, then double click the Add_MSI_Extract_Context.reg file to import the data into your registry.
Now right click on an MSI file and you’ll get a new option in the Explorer context menu called “Extract MSI”. To remove this menu entry, use the Remove_MSI_Extract_Context.reg in the Zip.
The contents of the installer will be extracted to a new folder at the same location as the MSI file with the name “MSIfilename Extracted”. If you receive an error while trying to use Windows Installer from the command line, you may have to use one of the dedicated tools above instead.