Il y a several reasons why programmes come as installers rather than standalone executables:
Fichier Size Concerns
-
Programs avec many, large dependencies can bundle Web-based installers that téléchargez le dependencies and place them in a common location, so that they can be shared by multiple programmes. Par exemple, DirectX is a very large library. If every single programme sur votre système that depends on DirectX just bundled the entire DirectX runtime avec it, it would consume a good bit of space. This may not seem to matter dans le age of 4 TB hard disks, but consider that SSDs are quite a lot smaller in capacity, and they're coming into common use on ultrabooks, some avec as little as 64 GB of storage. And of course il y a many other shared libraries aside from DirectX.
-
Programs that are both very large and continuously updated are best distributed as a collection of many small fichiers, along avec a launcher or updater programme that checks the Internet for an mise à jour, and if any mise à jour exists, seulement téléchargez le required changes. If all large programmes were shipped as a single monolithic executable, it is very likely that the patch processus would require re-downloading the entire executable, as patching the running executable fichier on disk is near impossible due to fichier locks. Également, parce que the updater needs to know where its fichiers are, it often stores that répertoire chemin in a well-known location dans le registry.
Utilisateur Convenience Concerns
-
Installers for very large programmes, such as Visual Studio and Microsoft Office, allow the utilisateur to de-sélectionner the installation of certain fonctionnalités, si le utilisateur knows they will jamais need them. Cela a 3 potential benefits: it reduces disk space consumption; it can reduce télécharger time and bandwidth consumption si le installer is a web downloader; and it can reduce "clutter" and "bloat" sur le utilisateur's machine, fewer menu Démarrer / raccourci bureaus, fewer startup programmes, etc.
-
Installers for complicated programmes often come avec configuration options that the utilisateur can set up using a utilisateur-friendly graphical interface as part du installer. See par exemple the MySQL or SQL Server installers, which can take you through the entire processus of getting your database server up and running avant you even click "Finish" sur le installer.
-
Installers can prompt the utilisateur for required information, such as license clés, which seulement need to be entered once. This can simplify the design du programme itself, and reduce the number of things it has to do and check for when it starts up. This également results dans le utilisateur having confidence that, once the programme is successfully installé, it should "just work" -- il y a no more "gotchas" withdans le programme that may hold them up from using it.
Compatibility Concerns
-
Some programmes conflict avec other programmes. C'est un simple and unfortunate fact of logiciel engineering. Avant l'installation a programme that has known conflicts avec other programmes, it is often helpful to first vérifiez le système to see whether an incompatible programme is installé. The utilisateur can ensuite be alerted if so. Par exemple, il y a a very dangerous incompatibility potential in older versions of VMware and VirtualBox, that resulted in a Blue Screen of Death, parce que one programme would try to use a special virtualization processor instruction après it was déjà reserved for utilisateur by the other product. Si vous were to simply provide the end product vers le utilisateur sans an installer, vous pourriez have to check for the presence of incompatible products at every start of your programme, which could lent down the startup du programme.
-
Programs may have dependencies on other système components that can seulement be installé at a système-wide level, not at a per-utilisateur level. In order to installer these special système components, administrative privileges are usually required, and an installer usually has to be run.
Elevated privileges and special services
- Some programmes depend on changes vers le système d'exploitation for their functionality, and these changes ne peut pas easily be implemented sans some kind of installer to take care dum avec administrative privileges. For instance, programmes that installer pilotes or kernel modules, such as Wireshark, ne peut pas simply be run, parce que you absolutely have to ship the kernel-mode components in separate fichiers. In the absolute best case, vous pourriez encore have to have the utilisateur manuellement unzip an archive, and ensuite run some kind of installer for the périphérique pilote. Services are another example of quelque chose that requires administrative privileges to installer. Installer logiciel is particularly good at obtaining admin rights in an elegant way, sans requiring that the main programme itself request admin rights every time it runs (this serait an unnecessary sécurité exposure in many cases).
Having given all these reasons for why installers are useful, ici are a few observations depuis le other side:
-
Many programmes, even those that are seulement disponible for télécharger as an installer that requires admin privileges, can be forcibly "unpacked" depuis leir installers and run directly sans l'installation them. Other programmes, especially open source ones, are repackaged into self-contained executables by PortableApps. C'est noteworthy that some programmes, when unpacked depuis leir installer, will have reduced functionality, exhibit erreurs, or other problèmes.
-
On système d'exploitations other than Windows, it is almost toujours possible to simply télécharger (or compile) programmes and run them as a regular utilisateur, sans obtaining root. Il y a a few exceptions avec respect to packages that are a core part du système d'exploitation, but for most utilisateur applications, vous pouvez run it in your home répertoire sans l'installation it système-wide using the package manager. Windows is a bit of a special case in that most desktop programmes on Windows have an installer, and can usually not be installé any other way.
-
Even on non-Windows platforms, programmes that need the ability to load a kernel module come avec some sort of installer, which compiles the kernel module and installs it dans le right répertoire. Vous pouvez également expect to see an installer dans le event that the programme is a daemon that sera started using a système service script, e.g. in /etc/init.d. This tapez of "shrinkwrapped binary" is a less common distribution method on GNU/Linux, but most Linux distributions encore provide most logiciel dans le form of installable packages, each of which requires root access (admin access) to installer.
Conclusions
You asked why we need installers. The short answer is that we don't -- not strictly speaking, anyway. Il y a vanishingly few examples of applications that cannot, in principle, be bundled into a single self-contained executable avec no resources, no installer, etc. Even quelque chose as complicated as VMware Workstation could automatiquement obtain admin privileges, write the hypervisor kernel module out to a fichier on disk, and installer it dynamically on programme startup, and ship all of its resources (images, sounds, etc.) bundled inside the data section du executable.
Using an installer or not is a choice that logiciel producers have to make. Il y a advantages and disadvantages to using an installer. Many vendors choose to distribute their logiciel both as an installer, and as a standalone binary, or au moins as a ZIP fichier that can simply be unpacked and run. For logiciel that ne absolutely require an installer, c'est a very pragmatic way to go, and makes everyone happy. Usually, logiciel that ne ship in any other form than avec an installer is logiciel that requires administrative privileges to installer some component of itself, depuis the installer is the most elegant way to obtadans le needed privileges.
Personally, I find installers very annoying in my day to day work, parce que sometimes Je veux run a programme when Je n'ai pas administrative rights sur le ordinateur I'm using. J'ai quite a bit of experience manuellement unpacking installers to extract the programme fichiers within, and ensuite getting those fichiers to run correctly. Cependant, sur mon personal PC at home where I toujours have administrative access, I find installers beneficial and convenient, parce que most installers give me useful options, like whether to créez un raccourci bureau, that I would have had to do manuellement à la place sans it.