Installation file: instructions for downloading and running

Installation files, or executable files (installation files), are sometimes called binary. Because their format is a continuous sequence of binary values. In computer technology, the installation file calls the computer to perform these tasks in accordance with the encoded instructions. This differs from a regular data document, which should only be read. A file with a name ending in .exe is a program that, when opened, forces the operating system to start the application.

Assignment and execution of files

Assignment and execution of files




Such installation files can be written manually in machine language, although it is much more convenient to develop software in the form of source code in a high-level language that can be easily understood by the programmer. In some cases, the source code may be specified in assembly language, which is closely related to machine code instructions. A high-level language is compiled either into the machine code installation file or into the object one.

A couple of the latter, interconnected, can create installation files. They have a container format, in the form of installation and linked formats (ELF). This structures the generated machine code, for example, segmenting it into sections:





  • .text - installation code;
  • .data - static variables;
  • .rodata are static constants.

For the system to execute, the installation file must correspond to the binary interface of the system application (ABI). It is most simply accomplished by loading into memory and simply navigating to the beginning of the address space and executing it from there. But in more complex interfaces, installation files have additional metadata that defines a single entry point. For example, in ELF, the entry point is indicated in the header in the e_entity field that defines the virtual memory address from which execution begins. In GCC (GNU Compiler Collection), this field is set by the linker based on the _start character.

Startup Structure and Functions

Startup Structure and Functions




Installation files, as a rule, include a system that controls the execution time, with the implementation of the language function, as well as scheduling tasks, handling exceptions, calling static constructors and interacting with the operating system. For example, passing arguments, environments, and returning exit status along with other startup and shutdown functions, such as freeing resources. For C, this is done by linking the "crt0" object, which contains the actual entry point and performs setup and shutdown by calling the runtime library.





Thus, Windows installation files usually contain significant additional machine code, in addition to that which is directly generated from the source. In some cases, it is advisable to skip it, for example, when developing embedded systems or just when learning how compilation, linking and loading work. In C, this can be done by skipping the normal runtime and instead specifying a linker script that generates an entry point and handles startup and shutdown, for example by calling mainstart and returning the exit state to the kernel at the end of the operation.

Types of Extensions

Executable exe files




The Windows installation file is also called binary. A program is a sequence of instructions that is understandable to the central processing unit (CPU) of a computer that it must execute with a data set.

Windows file extensions: .EXE, .COM, .BAT, .VB, .VBS, .WSF, .PIF.

Macintosh file extensions: .APP, .SCPT, .APPLESCRIPT.

Installation can be implemented in three formats:

  1. A custom third-party installation system into an .exe file.
  2. Windows Installer in MSI.
  3. Exe file that loads the msi embedded in exe.

MSI can only be installation, and EXE, on the contrary, can be literally everything that can work on a computer. Executable files consist of instructions that have been translated from source to machine code, also called machine language or object code, using a specialized compiled program. Machine code consists entirely of zeros and ones, which represent the state of the processor logic and memory cells.

Executable exe files

Windows Installer in MSI




Installation programs execute code or a series of instructions contained in them. Two main types: compiled programs and scripts.

On Windows systems, compiled programs have the .exe extension. On Macintosh computers, compiled programs have the APP extension. Both types of executable files are compiled from source to binary machine code, which is directly executed by the processor. EXE works only on Windows, and APP works only on Mac OS X. This is because the code is executed by the operating system and therefore must be compiled in a format that it understands.

Uncompiled executables are often called scripts. They are saved in text format, not binary. In other words, you can open the script and view the code in a text editor. Since scripts do not contain executable machine code, an interpreter is required to run them. For example, a PHP file can only execute code when launched through the PHP interpreter. If it is not available, then the PHP script can only be opened as a text document.

Since executable files run code upon opening, the user should not open unknowns, especially those received as email attachments. Such compiled executables are the most dangerous and can run malicious code. For example, VBScript (.VBS) can automatically run on Windows systems through the built-in Windows Script Host. Similarly, AppleScript (.SCPT) can be run through the AppleScript interpreter included with Mac OS X.

MSI User Interface

MSI are the database files used by the Windows installer. They contain information about the application, which is divided into functions and components, and each component can contain registry data. MSI shortcuts contain the user interface used for installation, and various other data as prerequisites. It may also contain actual files that must be installed independently; this is currently the recommended way to install MSI on Windows. An alternative is to write a program that performs the installation on its own.

How to install MSI on Windows




MSI is executed by EXE, which is part of Windows and is called MSIEXEC.EXE. This application reads data in MSI and executes the process.

The algorithm for launching MSI files:

  1. Open the Start menu in the lower left corner of the screen.
  2. Click "Computer" to open your own Windows 7 file manager called Windows Explorer. It displays drives and folders in the left pane. If you click on one of the drives or folders, you can see its contents in the right pane.
  3. Click "Organize" in the upper left corner of the manager and select "Folder and search options" from the drop-down menu. The Folder Options window opens.
  4. Click "View" at the top of the "Folder Options" window to view the viewing options.
  5. Uncheck "Hide extensions for known types" in the "Files and folders" section to see all extensions.
  6. Click "Apply" and then "OK" to apply the settings and close the "Folder Options" window.
  7. Use the explorer window to find the MSI you want to run.
  8. Click "Type" at the top of the right pane to sort files by type so that all MSIs are displayed together. If Type is not displayed at the top of the right pane, move the view slider in Details to display information, including Type. The view slider is in the upper right corner of the explorer window.
  9. Click MSI twice to start the Windows Installer application.

Launch for DOS system

Launch for DOS system




In order to run the file from MS-DOS, they run an executable type, which is a .exe, .bat or .com. To check which documents in the current directory are executable, use the "dir" command at the MS-DOS prompt. In this way, you can define a resource with .exe installation files or replace them with .bat or .com. After the name of the executable type is defined, enter its name on the MS-DOS command line. For example, if the executable is game.exe, enter "game" at the command prompt.

If the file is not located or an error message is received, for example, “invalid command or file name”, most likely this file is not in the current directory. Go to the executable directory and enter the command again. It is important to remember that when you run it from the MS-DOS shell (in MS-DOS on Windows), the program will still use Windows to run.

Creating Windows Directives

Each application must be copied to a PC with a specific directory structure, which ensures its proper functioning. You can use special software, such as Inno Setup, which is very useful when creating executable files (EXE) that act as installers of applications for Windows.

The main advantages of free software are that it has a large number of functions that work on almost all Windows systems (7, 2008 R2, Vista, XP, 2008, 2003, 2000, Me, 98, 95, and NT 4.0. 32 bits and 64 bits). For starters, it is recommended that you use the wizard, and then the built-in script editor for advanced compilation of installation files.

The Inno Setup Example Scripts folder contains many examples of templates for various models of application installers, it is recommended that you try all of them first to get an idea of ​​the range of options available.

Experienced users of this software can create their own scripts and modify them, creating powerful files for applications. It is recommended that you view the included help for more information on the available commands.

Finding the location of installation files

Finding the location of installation files




In order to determine which installation files, the easiest way to look at the properties of the shortcut. Sequencing:

  1. Open the shortcut properties window, for example for Firefox.
  2. You can use keyboard shortcuts if the shortcut is either in the Start menu or in the Programs list.
  3. Right-click on the shortcut and select "Properties".
  4. Find the full path to the executable file and its name.
  5. For this example: C: \ Program Files \ Mozilla Firefox \ firefox.exe.
  6. They go to the EXE through the Mozilla Firefox folder, where the Windows 7 installation file for Firefox will be located.

Game Archiving

Game Archiving




In order to turn the game into one EXE, they use the popular WinRAR archiver, create a new archive and name it. Copy all the game data .exe, font file, Unity exe and more there. Press SFX, then additional parameters. This will turn the entire RAR into a program that will extract itself and then launch the game.

Implementation settings:

  1. Add the name of the game installation file to "Run after extraction." Make sure that the extraction process is hidden and goes to a temporary directory.
  2. Set the "Overwrite all files" checkbox: in case you need to fix the error, it will replace the existing material in the temporary folder with new one.
  3. Add an icon, if necessary, in the "Text and Icon" section.
  4. After saving and clicking, there should be one .exe that will work.

IExpress Creation Method

IExpress Creation Method




IExpress is a utility that ships with versions of Windows starting with Windows XP and above. The utility comes with a graphical interface called the IExpress Wizard. And you can also create installation files using SED files written by hand using the wizard.

As in 7-Zip above, this method creates a self-extracting archive with two main differences. Firstly, the end user will go through the multi-page installation wizard, and secondly, the end user can specify the target directory in which the tool is located and unpack the files.

To create an EXE installer using IExpress:

  1. Open the Run prompt with the Windows + R key and enter iexpress.exe to start the IExpress wizard.
  2. Select "Create a new self-extracting directive file" and click "Next".
  3. Select "Extract only files" and click "Next."
  4. To confirm the request, select "No request" or "User request with."
  5. For a license agreement, a license is displayed, if you want the end user to agree to any license agreement (EULA), if not, then it is better to select "Do not display license."
  6. In order to add all the files that you want to see installed, click the "Add" button, go to the folder to select them all.
  7. Continue using the IExpress wizard and select the necessary options for the "Show Window" and "Ready Message" prompts.
  8. As the name of the package, click "Browse", go to the place where you want to create the installation EXE, and give it a name.
  9. Click "Next."
  10. Select "Save Self-Healing Directive (SED) file" if you want to create a modified installer later. If you select "Do not save", then you have to go through the whole process from scratch.
  11. On the Create Package page, click Next to end the process.

The application package, combining all documents into one, called the installation file, simplifies the deployment and configuration of them on users' computers. Customization reduces the total cost of ownership of the resource, allowing you to effectively install and configure applications. The result is a package that provides the product with new features, such as declaring functions without installing them, installing products on demand, adding user settings, and others.




All Articles