Installation files, or executable files (installation files), are sometimes called binary. Because their format is a continuous sequence of binary values. In computing, an installation file calls the computer to perform specified tasks according to coded instructions. In this it differs from a normal data document, which must only be read. A file with a name ending in.exe is a program that, when opened, causes the operating system to launch the application.
Assignment and execution of files
Such installation files can be written by hand in machine language, although it is much more convenient to develop software as source code in a high-level language that can be easily understood by the programmer. In some cases, source code may be specified in assembly language, which is closely related to machine code instructions. A high-level language is compiled either intomachine code setup file, or into an object one.
The last few, linked together, can create installation files. They are in container format, in the form of installation and linking formats (ELF). This structures the generated machine code, for example by segmenting it into sections:
- .text - installation code;
- .data - static variables;
- .rodata - static constants.
In order to be executed by the system, the installation file must conform to the system application binary interface (ABI). It is most simply done by loading into memory and simply jumping 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 separate entry point. For example, in ELF, the entry point is specified in the header in the e_entity field, which specifies the virtual memory address from which execution begins. In GCC (GNU Compiler Collection) this field is set by the linker based on the _start symbol.
Structure and launch functions
Installation files typically include a runtime control system with language feature implementation, as well as task scheduling, exception handling, static constructor calls, and operating system interaction. For example, passing arguments, environments, and returning an exit status along with other startup and shutdown functions such as freeing resources. For C, this is done by linking the object"crt0" which contains the actual entry point and performs setup and shutdown by calling the runtime library.
Thus, Windows installation files usually contain a significant amount of additional machine code beyond that directly generated from source. In some cases, it is desirable to skip it, such as when developing embedded systems or just 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 status to the kernel at the end of the operation.
Types of extensions
The Windows installation file is also called binary. A program is a sequence of instructions that a computer's central processing unit (CPU) understands to execute on a set of data.
Windows file extensions:. EXE,. COM,. BAT,. VB,. VBS,. WSF,. PIF.
Macintosh file extensions:. APP,. SCPT,. APPLESCRIPT.
Installation can be implemented in three formats:
- Custom 3rd party installation system to EXE file.
- Windows Installer in MSI.
- EXE file that loads the MSI built into the EXE.
MSIs can only be installers, while EXEs can be literally anything that can run on a computer. Executable files consist of instructions that have beentranslated from source code into machine language, also called machine language or object code, using a specialized compiled program. The machine code consists entirely of zeros and ones, which represent the state of the logic circuits of the processor and memory cells.
Runable EXE files
Installation programs execute the code or series of instructions they contain. The two main types are compiled programs and scripts.
On Windows systems, compiled programs have an EXE extension. On Macintosh computers, compiled programs have the extension APP. Both types of executables are compiled from source to machine binary, which is directly executed by the processor. EXEs only work on Windows and APPs on Mac OS X. This is because the code is run by the operating system and must therefore be compiled in a format it can understand.
Uncompiled executables are often referred to as 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. Because scripts do not contain executable machine code, they require an interpreter to run. For example, a PHP file can only execute code when run through the PHP interpreter. If it is not available, the PHP script can only be opened as a text document.
Because executable files run code when opened, the user should not open unknown ones, especially those received as attachmentsEmail. These 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 features and components, and each component can contain registry data. MSI shortcuts contain the user interface that is used for installation and various other data as prerequisites. It may also contain actual files that should install itself, which is currently the recommended way to install an MSI on Windows. The alternative is to write a program that does the installation itself.
MSI are executed by an EXE that is part of Windows and is called MSIEXEC. EXE. This application reads the data in the MSI and executes the process.
Algorithm for running MSI files:
- Open the Start menu in the lower left corner of the screen.
- Click "Computer" to open the native Windows 7 file manager named 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 on the right panel.
- Click "Organize" intop left corner of the manager and select "Folder and search options" from the drop-down menu. The Folder Options window opens.
- Click "View" at the top of the "Folder Options" window to view the viewing options.
- Uncheck "Hide extensions for known types" under "Files and folders" to see all extensions.
- Click "Apply" and then "OK" to apply the settings and close the "Folder Options" window.
- Use an explorer window to find the MSI to run.
- 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 to "Details" to display the details including "Type". The view slider is in the top right corner of the explorer window.
- Double-click MSI to launch the Windows Installer application.
Launch for DOS system
To run a file from MS-DOS, run the executable type, which is.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 determined, enter its name in the commandMS-DOS line. For example, if the executable file is game.exe, enter "game" at the command line.
If the file is not found, or if you receive an error message such as "invalid command or file name", the file is most likely not in the current directory. Change to the directory of the executable and enter the command again. It's important to remember that when you run it from an MS-DOS shell (in MS-DOS on Windows), the program will still use Windows to run.
Creating directives for Windows
Each application must be copied to a PC with a specific directory structure that guarantees its proper functioning. You can use special software, such as Inno Setup, which is very useful in creating executable files (EXE) that act as application installers under Windows.
The main advantage of free software is that it has a lot of features that work on almost all Windows systems (7, 2008 R2, Vista, XP, 2008, 2003, 2000, Me, 98, 95 and NT 4.0 32 bit and 64 bit). It is recommended to use the wizard first and then the built-in script editor for advanced compilation of installation files.
The Inno Setup Example Scripts folder contains many sample templates for various application installer models, it is recommended to try them all first to get an idea of the range of options available.
Experienced users of this software can create their own scripts and modify them to create powerful files forapplications. It is recommended to view the included help for more information on the available commands.
Finding the location of installation files
To determine which files are installed, the easiest way is to look at the properties of the shortcut. Sequence of actions:
- Opens the shortcut's properties window, for example for Firefox.
- You can use keyboard shortcuts if the shortcut is either in the Start menu or in the Programs list.
- Right click on the shortcut and select "Properties".
- Find the full path to the executable file and its name.
- For this example: C:\Program Files\Mozilla Firefox\firefox.exe.
- Go to the EXE through the Mozilla Firefox folder, where the "Windows 7" installation file for Firefox will be located.
Archiving the game
To turn a game into a single EXE use the popular WinRAR archiver, create a new archive and name it. Copy there all game data.exe, font file, Unity exe and more. Click SFX, then advanced options. This will turn the entire RAR into a program that will extract itself and then launch the game.
- Add the name of the game's installation file to "Run after extraction". Make sure the extraction process is hidden and goes to a temporary directory.
- Check the box "Overwrite allfiles": in case you need to fix a bug, it will replace the existing material in the temporary folder with the new one.
- Add an icon, if needed, in the Text & Icon section.
- After saving and clicking, there should be one.exe that will work.
IExpress creation method
IExpress is a utility bundled with Windows versions from Windows XP and up. The utility comes with a graphical interface called the IExpress Wizard. And it is also possible to create installation files using SED files written by hand using a wizard.
As with 7-Zip above, this method creates a self-extracting archive with two major differences. Firstly, the end user will go through a multi-page installation wizard, and secondly, the end user can specify the target directory where the tool is located and unzip the files.
How to create an EXE installer using IExpress:
- Open the Run prompt with Windows key + R and type iexpress.exe to launch the IExpress wizard.
- Select "Create a new self-extracting directive file" and click "Next".
- Select "Extract files only" and click "Next".
- To confirm the request, select "No request" or "User request using".
- For a license agreement, display the license if you want the end user to agree to anylicense agreement (EULA), if not, it is better to select "Do not display license".
- In order to add all the files that you want to see installed, press the "Add" button, go to the folder select them all.
- Continue with the IExpress wizard and select the desired options for the "Show Window" and "Completed Message" prompts.
- Click "Browse" as the package name, navigate to the location where you want to create the install EXE and give it a name.
- Press "Next".
- Select "Save a self-healing directive (SED) file" if you want to create a modified installer later. If "Do not save" is selected, you will have to go through the entire process from scratch.
- On the Create Package page, click Next to complete the process.
A package of applications that combines all documents into one, called an installation file, makes it easy to deploy and configure them on users' computers. Customization reduces the total cost of ownership of a resource by allowing you to install and configure applications efficiently. The result is a package that gives the product new features, such as declaring features without installing them, installing on-demand products, adding custom settings, and more.