Where are programs usually installed for a particular user?

On Windows, installing programs like Python without elevated privileges will default its install directory to "%LocalAppData%\Programs." Is this directory the "Program Files" equivalent, but only for that particular user?


Solution 1:

I don't believe John is right about where apps MUST install. While programs installing within a limited user profile are relatively new in Windows, VS Code isn't the only one and it indeed installs to directories within the user profile, does not require admin rights to install, run, or update, and is actually a recommended method for running programs that do not need enhanced rights.

The logic is that a program that can run entirely within the much more limited rights of a limited, non-admin user accounts profile and its stricter limitations will, by nature, be much safer application.

Google Chrome also has a limited user install mode, just to name another prominent program that offers this.

VS Code, after it released its limited user version, pushes it as the recommended choice, which considering it is a Microsoft product, speaks to the acceptability of this method.

Solution 2:

On Windows, installing programs like Python without admin will default its install directory to "%LocalAppData%\Programs." Some programs install it right into the root of your user folder. Which is correct?

I'm trying to say, what is the windows recommended directory for installers (without elevated privileges) to install its binaries to? For example, VS Code's User Installer defaults its install directory to "%localappdata%\Programs" This is also the same case with Python Installer if you don't run it with elevated privileges.

%LocalAppData%\Programs is absolutely the correct installation location for Visual Studio Code since it utilizes the Electron Framework. The Atom editor which is also built on the Electron Framework, default location also uses the %LocalAppData% directory, within the user profile on Windows. I have no reason to believe that it also isn't the legitimate installation directory for Python.

Based on the fact that every legitimate application built upon the Electron Framework I have installed, installation directory was within %LocalAppData%, I can conclude that every application based on the Electron Framework will also be installed to the %LocalAppData% directory.

Visual Studio Code is built primarily with standard web technology (HTML, CSS, JavaScript). We leverage Electron [previously Atom] as a cross-platform host. This allows us to focus on the core experience and put our efforts into developer productivity (Editing, code navigation, code understanding, and debugging) and offer these features on Mac OSX, Linux and Windows. We are working with the Electron team and actively contributing back to that framework.

Source: Microsoft’s cross-platform Visual Studio Code app is based on technology from Github’s Atom editor

I happen to install the Atom and is installed to the %LocalAppData% directory within my profile. I also happen to have Authy installed on my system, which is also built upon the Electron Framework, and the executable for it is also located within %LocalAppData%

Chrome used to also use the %AppData% directory to store it's an executable file, which basically allowed any user to install Chrome on their PC since the have full permissions to the %AppData% directory. It isn't relevant, but Chrome went away from that directory, for a variety of reasons a good number of years ago

More specifically, what directory, in Windows, was meant for installers to install their binaries/executables for a specific user?

The directory the executable for an application should exist in entirely depends on the permissions of the user running the application. There are legitmant reasons to install an application to a directory within %LocalAppData. One of the many reasons, include users with limited permissions, are able to install and run the application. While the installation directory for Chrome no longer exists within %LocalAppData%, one of the many reasons it was installed there, is to avoid the UAC request when installing Chrome.

Is this directory the "Program Files" equivalent, but only for that particular user?

%LocalAppData% is absolutely not equivalent to Program Files and Program Files x86.

Windows doesn't tell programs anything. The installer either defaults to an installation directory, and given the permissios of the users, the installation is allowed to continue or the user selects the installation and directory and given the user has the correct permissions the installation is allowed to continue.

You could install everything to the root directory of the system drive if you really wanted to, provided you ran everything you installed with elevated permissions, Windows does not actually care about the location of an application’s executable.