Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does installing my app into Local Application Data folder has drawbacks?

Currently planning on making the installation process for a .NET application I'm selling smoother (read: "possible") for non-administrator users, I stumbled upon applications like Google Chrome and Microsoft SkyDrive:

They seem to not install into the usual "Program Files" folder, but instead into the "Local Application Data" folder of the current user.

Since this folder is on a per-user-basis, it is writable for the current user and no administrative permissions are required to write into.

I've managed to change my NSIS setup to work correctly and install into this folder, but I'm still unsure whether this is good practice and might have drawbacks or not.

My question is:

Do you have any recommendations on why to install or not to install into the "Local Application Data" folder?

(I do hope this question is programming-related enough to be kept here)

like image 688
Uwe Keim Avatar asked Jun 19 '12 07:06

Uwe Keim


People also ask

Is it OK to install Python in AppData?

By default the Python installer for Windows places its executables in the user's AppData directory, so that it doesn't require administrative permissions. If you're the only user on the system, you might want to place Python in a higher-level directory (e.g. C:\Python3.

Why do apps install to AppData?

why do programs save their data in the AppData folder and not in their Program Files' installation folder? Program Files is for storing the program itself, AppData is to store user specific information related to the program. (And ProgramData is to store not user-specific information related to the program).

Should I use AppData?

You won't need to access or use this folder very often, but it contains your important app files such as your bookmarks, game data, saved sessions, and so on. However, sometimes, but rarely, you may need to access the AppData folder and scrutinize its contents.

What is the purpose of AppData folder?

The AppData folder contains custom settings and other information needed by applications. For example, you might find the following in your AppData folder: Web browser bookmarks and cache. Application configuration files.


1 Answers

It was not clear from your question but you should install the program in $LocalAppdata\Programs and not just $LocalAppData (FOLDERID_UserProgramFiles constant in Win7)

I know I like apps that can install as non-admin, at least you know the app does not require a driver or that it messes with the machine configuration in other ways.

Some people prefer to do a machine-wide install and giving the user this option is not that hard in NSIS:

  • RequestExecutionLevel highest
  • Add a custom page with two radio buttons (Just Me and All Users) and gray out the machine-wide choice if user is not admin (UserInfo plugin)
  • Set $Instdir and SetShellVarContext based on install mode
  • Use SHCTX as the registry HKEY

Some IT people/domain admins might not be happy if their users can install stuff, that is the only negative I can think of but they should lock down the system properly if they think it is a problem IMHO...

like image 111
Anders Avatar answered Sep 21 '22 15:09

Anders