Why does every installer on Windows have to be run with elevated privileges

installerwindows

The current tendency to ship even the smallest applications (like simple games, tools, etc.) as a Windows Installer (.msi) or even with .exe that can do virtually anything is very annoying. After the application is installed it is run as standard user, but it is useless if during installation it can do what it wants.

For example, configuring a firewall, maybe I do not want my new shiny 15 KB calculator application to have full access to the Internet (for incoming connections 🙂 )

Custom actions inside Windows Installer installer files are even worse, since it is possible to run a custom function inside the provided DLL file!

How do you manage to handle this, just ignore problem, or maybe have some unknown for me methods of running Windows Installer packages? And from the other side, why on Earth is everybody making installers? In many many cases, a simple ZIP file will be enough, at least as a opportunity to a standard installer.

Best Answer

The reason you need elevated privileges has to do with a per-machine install. If you were doing a correct per-user install, you would not need elevated privileges. So this is an education/learning issue with the developers of the small applications and the end users, as they all expect to need to run installs at elevated privileges. Only installations that need to be used by all users should install as per machine on Windows Vista and above.

Some more per-user information is in Per-user Installations (MSDN).

Related Topic