Why do many Windows programs install to `C:\Users\<username>\AppData`?

0

Whenever I install Windows programs I always make the installation drive be something other the C-drive. However, the installer almost always puts many files to C:\Users\<username>\AppData even if they put some of the files in the location I specified.

I want the operating system (Windows) on its own hard-drive with nothing else. That way if the operating system hard-drive fails, I only lose the operating system. I can always go get another copy of Windows. After I get a new drive and Windows, I still have all of my old files. Thus, I put my files on hard-drives I replace regularly or back-up, and software on drives I don't care about. It's fine to allow a hard-drive to fail if there are copies of the files on that drive somewhere else.

Why do many Windows programs install to C:\Users\<username>\AppData even if the user provides another path, such as E:\SOFTWARE ? Given that it's common practice, there must be some reason why.

IdleCustard

Posted 2019-01-06T21:32:27.013

Reputation: 103

"Almost always"? I've only seen 2 or 3 programs do that out of maybe hundred, and even those only do so because they put the whole program in there. – user1686 – 2019-01-06T21:38:39.477

To do what you want to do you need to redirect the user profile directory, which is more complex and cannot be completely done. – music2myear – 2019-01-06T23:50:01.290

Answers

2

A direct answer to the "why" question is simple: your home directory is one of few guaranteed places where an app can store its files under a normal (non-admin) account. When you install something to a default location under C:\Program Files, it has to ask you for admin privileges to do it. Now consider that an app has to store modifiable files (such as user settings). It can't do it in its home location (as it was typical in Windows 9x times): in case of C:\Program Files it would need to ask your permission to write it every time it needs.

Furthermore, in case of several users of the same PC this mechanism gives a natural way to separate personal files of different users.

The implied question is how to store your user data on a non-Windows drive. Well, one option would be to move your home folder to drive E: as well (there are many instructions how to do it, such as this one or that one).

You can even consider putting your user folder under cloud synchronization, that's what I do to a certain extent, to keep personal files backed up.

rg_software

Posted 2019-01-06T21:32:27.013

Reputation: 146

This. When installed to Program Files it's an "all users" program, and even these will often save their per-user settings to App Data. Some programs don't need to be installed for all users and function just fine in the more limited permissions of the user's App Data directory and so will install themselves there – music2myear – 2019-01-06T23:47:41.627

0

Because that is the equivalent of your "home directory" on a *nix machine, and so that is where personal settings for applications (think your profile, etc) are stored.

ivanivan

Posted 2019-01-06T21:32:27.013

Reputation: 2 634