Archive: Permissioning issues with Nsis Installer


Permissioning issues with Nsis Installer
Hi Everyone,
I am facing below issue once the installation is complete.

1. I have two option to install Local users and Admin user.
2. IF Local User select,it can install in its local folders (eg: C:\Documents and Settings\mhatreakshay)
3. IF Admin User user select,it will select default dir to Program files.
4. However if i select Admin User and try to install it in any local users folder (say C:\Documents and Settings\mhatreakshay) ,it will complete the installation properly.
5. But when i login using the local user (mhatreakshay) , and click on the start icon it gives a permission denied error.
6. I checked the permissions on the files,some files have Admin rights only .local user mhatreakshay cant access this files even if they are been installed in his local folder.
Please help.

I am trying this on windows machine.

Regards
Akshay


http://nsis.sourceforge.net/AccessControl_plug-in


thank you.Is this the only option to handle this issue ?
cant the installer by default permission the local user for accessing the files if administrator is installating in his local directory?


Yes, it can. Using the AccessControl plugin.

NSIS doesn't do anything automatically. You must tell it what to do.


but i have issues only with files with the extensions
.bat , .jnlp , .xml ..
I the local user can access .exe and other files properly.so i am bit confused with this behavior.


I've no idea what you're trying to accomplish. Is there a specific question, in there?


sorry for the confusion.let me explain it.
I have created a installer which installs my application.
once installed ,it has .bat , .jnlp, .xml , unistall.exe , .jar and other extension files.
I logged in as a Adminitrator(amhatre) in my system and installed this application for a local user in the local users directory C:\Documents and Settings\xyz.
Now the problem is ,local user "xyz" cant launched the application using the .bat file.
He gets a permission denied error.
But at the same time local user "xyz" can access the uninstall.exe and uninstall the application.

So my question is ,
Why is that the local users cant access files with specific extension ,.bat in this case ?
do i need to do something special for this to work ?
And how will i be able to use access control ,if required in such scenario ?

Thank you in advance.


hey its leting the user access uninstall.exe since its been creating using . WriteUninstaller.
but other issues still persist.


If it's just the batch file with the issue, how about replacing it with an executable. You could even write the executable in NSIS (use SilentInstall silent).

Stu


It may very well be that he's trying to do some writing commands in the .bat, and that those commands are throwing an access denied error.

Once again, use the accesscontrol plugin to give users access.


If you can avoid having to change permissions then that would be best. The files and folders you extract/create should be inheriting the permissions from their parent. And applying permissions for that user is easier said than done. How can he be sure what the user name is? Perhaps get it from the path but that is messy. Perhaps you shouldn't be allowing the user to install to certain paths.

Stu


Originally posted by Afrow UK
If you can avoid having to change permissions then that would be best.
True enough. But since he's not saying what exactly is failing...

Originally posted by Afrow UK
Perhaps you shouldn't be allowing the user to install to certain paths.
I think he's installing there on purpose. I've never heard of an end-user manually selecting the user profile folder, regardless of whether the installer was elevated or not.