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)
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 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).
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.
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.
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
UserInfo
plugin)$Instdir
and SetShellVarContext
based on install modeSHCTX
as the registry HKEYSome 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...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With