what happens when you install a program? Why is it not sufficient to just download the files?


what happens when you install a program? Why is it not sufficient to just download the files?

In: Technology

It varies between different operating systems but usually it’s a matter of putting the files in a place where the OS expects applications to be installed, changing permissions so that the programs are marked as allowed to be run and, in some cases, modifying the code for specific hardware and software systems.

Sometimes those files are compressed, and to decompress them properly you need to run the installer. And some programs need to access and potentially rewrite system files, and the installer does that for you rather than making you do it.

And sometimes, some programs install into multiple different folders on your HDD so you can more easily access say a folder for your projects made by the program (or dozens of other reasons) rather than sifting around the program’s location.

Sometimes it is sufficient to just download a file and run it.
But many times the application consists of many files. Then, the installer makes sure these are placed somewhere on your drive. For ease of use the installer will often create a shortcut as well. But developers often add more stuff for installers to do, such as making sure a user accepts a license agreement, checking the system for suitability and installing any libraries or drivers that might be needed.

There are too many possible answers. Do you have a specific example? Because it mostly has to do with what the task is.

There are multiple things that happen when you install a game.

The largest part is unpacking. Large programs are packed together to make them smaller and easier to download, so when they are on your PC they need to be unpacked again, just like .zip files except that they use other packing methods.

Then they are setting up new folders and permissions. Open up your documents folder and you will see the names of games you have installed. This is because savegames or config data is not always stored with the rest of the program, but in documents or roaming, so you still have the data even after deleting the program.

Some programs have dependencies, like direct x. The installer will check for those and only install them if necessary.

Lastly, he offers to create a shortcut to your desktop.


I forgot to add, that there may be registry edits, where the program needs to change your registry to work.

There are “portable” programs as well, they don’t need to be installed, because they have none of the requirements mentioned.

Imagine installing a program as building Ikea furniture.

It’s not sufficient to just leave your table in a box on your doorstep, right? You have to bring it inside, unpack it, put it all together, AND lastly, put it in the place that you want it so that it can be used as a table.

Computers have to do the same thing a lot of the time. Most times they have to take the files and put them in the correct places, and make sure they all fit together properly. Lastly it puts the main application in the correct place and makes sure that the computer knows it’s a program that it can run.

Installation can do a lot of things, though what specifically it does depends on the program.

First, downloadable programs are usually compressed and archived to minimize their download size, so the installation program will decompress and unarchive the files it needs. In order to run these programs directly from the download files, the program would need to decompress them on-the-fly, which is both complicated and *slow*.

Second, the programs you download often don’t have everything they need to run. Instead they rely on a lot of shared code already being present on the computer (if you’ve ever had a program complain about a missing .dll file, this is what it was talking about). The installation program can find these shared files and let the finished program know where they are. The alternative is to pack all of that shared code in with the download, which can bloat the download by hundreds of megabytes, depending on what shared code is used.

Third, every computer is different. In order to have a single download that “just works” for almost everybody, a program may need to build/select some of its components once it’s actually on the computer and sees what it has to work with. The alternative is to have dozens of different versions of the program and require the user to know enough about their computer’s internals to pick the right one.

An installation program can do a lot of other things as well, but these three are some of the big ones. It could also set some registry values, do some anti-piracy checks, etc. It just depends on the program.

I’ll use Windows for this. I know small utility programs that are both straight runnable and as an option you can run an installer. To run the executable, you run it. You might put it somewhere and put a shortcut on your desktop. The installer version puts the program in the programs folder, puts an entry in the start menu, can put a shortcut on the desktop, and can associate the program with certain file extensions since those are functions of an installer.

More complex programs, ones that come with many other files, usually like to have an installer so they can all be put neatly in your programs folder and do even more integration with the OS (such as adding registry entries). However, I also have some programs that have other files that you just put in the folder of your choice and run.

It’s different on the Mac. Normally a program and all of its associated files are contained in one file called a bundle. Internally, this file has full folder structures containing all of the files an app needs. You can drop it anywhere and execute it, and the OS will know which file within the bundle to run as the executable. If you’re on a Mac, you can right click and select “Show Package Contents” to see what’s in it.

a lot of the time that *is* sufficient. you can test this by installing things on one PC, then copying them to another. many will work just fine, even if you move them to the “wrong” folder. and if they keep files in a separate location, like documentsgamessavefiles that location is just regenerated the first time they run on the other PC

the main thing to cause problems on windows is redistributables like Visual C++ that have to be present on your PC for the program to work, and registry entries that control things like which entries are added to your right-click menu

There are many programs out there where you *can* simply download the program wherever and run it. Sometimes you might have to extract a compressed archive first, because operating systems usually aren’t designed to run compressed applications like that.

But in some cases the application is bigger and more complicated, it expects to have certain files and folders in certain locations, maybe it relies on third-party libraries that are shared by other applications on the same PC, maybe it needs to integrate with the system, register file associations, create a background service, do some initial setup/configuration, etc. So for those scenarios, an installer can take care of all that. Or maybe the developer wants to ensure only the latest version is installed, so the “installer” is just a client that downloads and installs the actual program.

Or, maybe it doesn’t need any of that, and the installer is for nothing more than convenience, putting the program in a standard location like “C:\Program Files” and adding some desktop/Start menu shortcuts. There are lots of average computer users out there who have difficulty working with files and folders and unzipping etc.