Why can’t all programs be standalone .exe ?

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

You are viewing 1 out of 7 answers, click here to view all answers.