Why can’t all programs be standalone .exe ?

27 views
0

Why do we have to install programs to programfiles and have some leave behind empty folders when uninstalled? Like why cant we just have the standalone .exe thats saved on the desktop? It would be much easier to remove as you just need to delete the icon right?

In: 3

Most software either requires or is just easier to make with supporting files. Those files might be configuration settings or saved data or files that help the program run properly.

Also uninstalling a program is not always as simple as deleting the files that showed up when it was installed. Many programs make changes to your computer that aren’t apparent to general users. When you run the uninstallation software it (should) undo these changes.

Also file size and pains with updating that file, as someone else has said now.

Because then you’d have an absolutely _massive_ file, which might be _slightly_ more convenient for you, but would make managing the project — for the programmer or _team_ of programmers — a hell of a lot _less_ convenient. Imagine every tiny change to a tiny library requiring you to rebuild the entire project, not being able to try different versions of icons, different colour schemes, etc.

One thing to keep in mind is dependency from 3rd party. Having separate file allow you to easily and universally update those 3rd party file, even without an official update from the main developer.

Also, those 3rd party may be shared across multiple software. So sometimes those 3rd party are installed once (outside your software).

Often they want to keep certain files apart like game level files so you can install your own levels for example. Many programs have separate help files.

Some programs are more complicated too, with multiple parts. Word and Excel are two different programs so of course they would be two different EXE files. But did you also know there are also DLL files that other programs can access? They have to not only be separate files, but also the registry has to say where they are so that they can find them.

So there’s a lot of incomplete answers here it feels like but that’s fair because there are a lot of reasons this would be a terrible idea.

From a technical standpoint

This is literally impossible based on the way a .exe works. First off with Windows (exe files are specifically a Windows thing btw, other operating systems don’t use them) .exe files are limited to 4GB in the first place. You simply can’t make them be bigger than that because windows won’t let you.

But let’s assume that limitation is removed. The way a .exe works is that the entire thing is loaded into your RAM (i won’t go into too much detail about this because otherwise, this answer will get too long for my liking) your average computer has about 4-16 GB of ram and the highest end PCs tend to have around 64-128ish. So outside of some smaller programs, basically impossible for 99% of people. If for some reason you *did* have enough RAM that’s a terrible idea to load a bunch of stuff you don’t need.

But even without that you still have this stuff:

From the developer’s perspective:

1. building a single massive .exe takes a long time. Not writing the code but just like…compiling it and going “ok, here you go customer”

So any time a small change needs to be made instead of being able to tweak one file and then be done and then put together a really small updater you would basically have to build the .exe over again. That’s not super labor intensive when done right but it’s computationally intensive and takes time for a computer to do. No reason to make people wait. Not to mention you now need to have a lot more bandwidth to allow people download lost massive files more often.

2) a lot of software requires that the users manipulate…stuff. It’s less common in basic consumer software but super users and admins need to be able to adjust bits and pieces of the software in ways the developers might not even expect. You can either a) let them edit files using windows and be done with it or b) program some kind of interface they use to edit that data from within the .exe. Option A is basically free, option B is reinventing the wheel and would cost a lot of money. A basic example I can think of is that I used to work for a company and we would ship software to the customer and they could replace the logo. How did they do that? went in and replaced the logo file. That was way easier than writing the code to let them do that within the software itself.

From the user’s perspective:

1. Do you really want to redownload 50+ GB of software for every single update? Probably not.
2. Do you want to have redundancies on your PC? Probably not. Normally programs you run share a lot of different files on your computer it would be a pain to have every single program contain everything it needs to run. Your computer’s storage wouldn’t go anywhere near as far.
3. Do you enjoy/know how to mess around with files on your computer? If you don’t, then having a single file doesn’t really change anything for you. You should touch anything anyway. But if you do that’s now basically impossible. Personally, I do small mods for a lot of games and that means I go in and manually manipulate files. A single .exe makes that impossible.