Search code examples
installationnsisadministrator

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)


Solution

  • 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...