+3 votes
522 views
How to extract files from an installer in Windows

in Guides by (369k points)
reopened | 522 views

1 Answer

+4 votes
Best answer

How to identify the type of installer (at least try) and general method to decompress installers.
General method to decompress installers.
Deepening the decompression of installers with other tools.
To end"¦
How to extract the contents of an installation .msi file.
How to extract files from an installer created with Inno Setup.
How to extract files from an installer created with NSIS: Nullsoft Scriptable Install System.
How to extract files from an installer created with WiX Toolset.
How to extract the contents of an installer created with Advanced Installer.
How to extract files from an installer created with InstallAware.
How to extract the contents of an installer created with InstallShield.

Surely on more than one occasion you wanted to extract the files from an installer and thus carefully analyze what files will be installed in the operating system . Today we are going to give you a complete guide on how to extract the files from an installer in Windows . This tutorial will cover both the decompression of files with the .msi extension and the usual .exe .

image

Personally I usually decompress the installers to scan the unpacked files with an antivirus or to create a portable version of the program.

Currently there are different types of installers and sometimes it is difficult to identify them. On other occasions, the developer has taken enough trouble to prevent the installer from being easily decompressed. It is true that there are advanced reverse engineering techniques that can allow us to decompress "impossible" installers, but they are not the objective of this tutorial.

How to identify the type of installer (at least try) and general method to decompress installers.

Before we can extract the contents of an installer, we must try to identify what kind of installer we are. Currently there are different types of software that allows you to create installers, but the most used are:

  • Inno Setup
  • NSIS: Nullsoft Scriptable Install System.
  • WiX Toolset
  • InstallShield
  • InstallAware
  • Advanced Installer
  • Windows Installer or Microsoft Installer (files with extension .msi) .

As we can see, the installers can be files with extension .msi , or executable files with extension .exe (most common) . In addition to unpacking the program files, these installers are also responsible for registering the necessary libraries, making the necessary changes to the Windows registry, etc.

A small trick that allows us to obtain information about the installer , is to run it through the command console (usually requires administrator permissions) as follows:
setup.exe /?

image

By executing it in this way you can display a help window that allows us to identify the type of installer. We must be clear that this method does not always work, but we do not lose anything to try.

General method to decompress installers.

In this first step, I will show you the easiest way to examine, decompress, inspect or extract the files of an installer. We will use a program specially designed for this task called Universal Extractor .

image

For the download of the program you can go to the official website http://legroom.net/software/uniextract or through this mirror .

With Universal Extractor it is really easy to decompress an installer, the program itself is responsible for detecting the type of installer and decompressing it automatically.

Deepening the decompression of installers with other tools.

It has become clear that with Universal Extractor we achieve our goal, but in this section I want to delve into other alternative tools and methods to decompress installers and learn more about them.

First of all we must be clear how to open the command console with administrator permissions , for this you can follow the tutorial of the link.

How to extract the contents of an installation .msi file.

Let's start talking about the installation files with the .msi extension, since it is very common to find them and their decompression is quite simple.

To decompress .msi files and extract their contents we execute the following command:
msiexec /ac:\testfile.msi /qb TARGETDIR=c:\temp\test

There is a second option that is to use the Lessmsi program, it is a free and open source Windows compatible application.

How to extract files from an installer created with Inno Setup.

To decompress the executable installers created with Inno Setup we can use one of the following programs:

How to extract files from an installer created with NSIS: Nullsoft Scriptable Install System.

In this case we have it quite simple, we can use the 7zip decompressor directly on the installer executable and thus decompress its contents.

How to extract files from an installer created with WiX Toolset.

In this case, the application package itself includes a decompressor. We have to go to the official Wix Toolset page and download the package. Inside we will find the Dark.exe executable with which we can decompress the installers by executing the following command:
Dark.exe -x setup.exe

There is a second option that consists of running the installer itself from the command line as follows:
setup.exe -layout

How to extract the contents of an installer created with Advanced Installer.

To decompress an Advanced Installer installer we have to run the installer itself from the console with the following command:
Setup.exe /extract "C:\Archivos Descomprimidos\instalador"

Where we specify the path where the files will be decompressed we will have to use quotes if we use a path with spaces. It may be that the decompressed file is a single file with an .msi extension, which we will have to unzip again as we indicated previously.

How to extract files from an installer created with InstallAware.

The executables created with InstallAware can be decompressed directly with the 7zip decompressor. Sometimes the unzipped file will be a single file with an .msi extension, so we will have to unzip it once more as we indicated above.

How to extract the contents of an installer created with InstallShield.

In this case we will have to resort to the command line (usually with administrator permissions) and execute the command:
setup.exe /extract_all

To end"¦

As you can see the process of decompressing an installation file is quite simple, although there are situations in which it will not be possible because it has some kind of protection.

Anyway, I want to take the opportunity to warn you once again of the danger of downloading files from unknown sources, especially those that we download from the internet. I personally use VirusTotal to check if an executable file is safe or not.


by (2.3m points)

Related questions

+3 votes
1 answer
+5 votes
1 answer
+5 votes
2 answers
+5 votes
1 answer
Please leave a comment about whether the solution works or not (with device model)   [X]Close
7,082 questions
7,179 answers
317 comments
2 users