How to extract MSI files from an EXE installer
You need to extract an .msi file from an .exe installer.
There are at least three ways of solving this problem, but none of them is universal. You might need to go through all of them to find the one that works for the EXE installer that you have.
CodeTwo strongly advises against extracting (and using) MSI files from the EXE installers of the CodeTwo software. Unless the product website allows such an operation (or unless you are instructed/allowed to do so by CodeTwo Support), use the .exe setup files.
The first method is based on the fact that most installers extract their .msi files to the temporary files folder during the installation process. To extract an MSI file from an EXE installer, you need to:
- Launch your .exe file.
- When you see the first prompt (e.g. a question about whether you want to continue installation, accept a license agreement, etc.), do not click anything in this window and do not close it.
- Open Windows Explorer, type %temp% in the address bar and press Enter.
- Sort the files in the folder by the modification date. The newest file on the list should be the .msi file you are looking for.
- Copy the MSI file to a safe location before you close the installer prompt window (see step 2). Be aware that if you close the installer window, the MSI file will be immediately deleted from the temporary files folder.
The second method uses a free third-party tool called 7-Zip to browse the content of the .exe installer file. Follow the steps below.
- Download 7-Zip from this page and install it.
- Right-click on the .exe file (from which you want to extract an .msi file) and from the shortcut menu choose 7-Zip > Open Archive.
- Do not extract any files yet. Instead, browse and look for the folder MSI within the contents. It might take some time to find this folder because it is not always located directly in the root directory (its location may vary depending on the installer).
- When you locate the MSI folder, you will notice that it most likely does not contain any .msi files, but a file or files with no extensions and rather cryptic names such as 132. Despite these misleading names, these are actually the MSI files you are looking for.
- Drag and drop these files to any desired folder or select them and extract them with 7-Zip. Close 7-Zip after that.
- Change the names of the extracted files so that they include the .msi extension.
- If there are two files, the larger one is the 64-bit installer, and the smaller one is the 32-bit version. Use the one you need.
The third method works with InstallShield based projects. To get the MSI file from your EXE installer, you need to:
- Log on to a computer where the software (the installer of which you would like to access) is not installed. This is because this method forces the uninstalling process to trigger extraction of the .msi file. If you already have this software installed, this method will remove it, which might not be desired.
- Run Windows Command Prompt (cmd) (in Windows 10: open the Start menu, type cmd and press Enter) and go to the folder where your EXE file is located.
- Execute the command below:
<file.exe> /s /x /b"<target-folder>" /v"/qn"
replace <file.exe> with the name of your .exe file and <target-folder> with the path to the folder where you want the .msi file to be extracted (for example C:\Folder).
As described in this thread, the switches for the command above do the following:
- /s /x - silently (/s) uninstalls (/x) the product from the system;
- /b - defines the target path for the .msi file;
- /v - passes desired arguments to the installer. In this case, the argument is /qn - it disables GUI and any prompts.