Archive: Install for all users


Install for all users
My software writes to the installation directory when it runs. If a user does not have write privileges to the directory, it generates an error.

The current solution is to install as an admin and give write privileges to the install directory to all users.

A better solution would be to change the software to write to a standard user directory so permissions would not be an issue.

Another option I wanted to look into was that some installers I've used have an option to "Install for all users". How is this done with NSIS?


do you mean installing the shortcuts for all users?


I used to build a custom dialog with 2 radios (all users-current user) and depending on users selection I was setting the SetShellVarContext either to all or current.

http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.7.6


Sounds like the sort of thing I'm looking for, I think.

So if you had admin privileges on a machine and ran an installer with the all users set to true ( which I think you could only do if you had admin privileges ), would this give all other users, even non-admins, privileges for the install directory?

That is, is this a way to do what I describe above ( giving all users write access to the install directory through folder Properties ) only through NSIS install tools?


the accesscontrol plugin, but it is a security risk to give all users write access to something in programfiles


I believe it would be better if we changed our software such that it did not require this tweak, but I was just trying to come up with options for people.

Thanks for the help guys. I read some of the NSIS documentation on SetShellVarContext, which sounds like it returns a list of folders accessible by the current user rather than handling any sort of privilege control. I'll check out what I can find about the accesscontrol plugin now that I have a name for it.