Why can’t all programs be standalone .exe ?

188 views

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

7 Answers

Anonymous 0 Comments

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.

Anonymous 0 Comments

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.

Anonymous 0 Comments

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).

Anonymous 0 Comments

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.

Anonymous 0 Comments

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.

Anonymous 0 Comments

Because the exe is just a simple thing. In essence it is just some wrapper that imports a couple of libraries, which parse the command line options, fetch the configuration and start the actual application. The actual application is actually a whole bunch of libraries, these are for example the dll files. These libraries are the meat of the program and all have their own seperate domain/task. Ideally they do only one thing and one thing well. All those things combined is the application you started by double clicking the exe.

When you want everything in one file it just gets too big and potentially requires a whole lot of memory at startup. Because the whole lot needs to be loaded into memory just to start it. By splitting this up things load quicker and require less memory. It also allows developers to patch their apps quicker and better. Imagine you having to patch your app and everyone needs to download a 2Gb exe file because one of the modules need to be replaced. With a simple patch you can just replace the required library and restart the app. You now only need to download several kilobytes. The bigger or more complex the application becomes the easier it becomes with the domain separation by using libraries. Only replace those libraries that need replacing.

Also when building these apps it can build certain things quicker because compilers know which source files were changed and only rebuild the nessecary binaries. The rest stays unchanged. So the development cycle becomes quicker. And for some users who tend to build applications from source it can mean they can install these apps quicker as opposed to having to compile everything every single time code changes.

The problem is that applications know exactly what to install but the deinstallation may have been more of an afterthought. Or what sometimes happens is that files are created by users and than the deinstaller wont delete that folder. Because stuff is in there.

Anonymous 0 Comments

They can, but it’s a huge pain and there’s some security issues.

The most basic thing is expecting to be able to use the OS’s system calls. Not every program wants to know how to interface with every possible hard-drive maker and motherboard architecture. Every program COULD run bare-metal right on the processor with no layers inbetween, but that’s nuts. Operating systems that handle standard calls have been a thing since the 50’s.

This sort of “offloading of responsibility” has continued. It makes executable smaller and faster which is almost always good. A lot of people really hate waiting for programs to boot up. Anything you can just do once during installation saves time.

Then there’s things like remembering who you logged in as last time. Configuration, settings, saved files. If the program can’t really keep these things in it’s executable (well, it CAN, but you’re looking at virus behavior) so it needs a place to store these files. So you need a “program files” folder.

If you want your program to show up when you hit that little start button in the bottom left, then the OS needs to be told it exists.

The concept of just not bothering or needing any of that is [“portable applications”](https://en.wikipedia.org/wiki/Portable_application). They’re still tied to an OS, Windows or Linux, but try to do without any of the other fluff that happens at installation. I think it’s a great idea.