Old 18th May 2011, 10:29   #1
mhatreakshay
Junior Member
 
Join Date: Jan 2011
Posts: 8
Unhappy 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
mhatreakshay is offline   Reply With Quote
Old 18th May 2011, 13:15   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
http://nsis.sourceforge.net/AccessControl_plug-in
MSG is offline   Reply With Quote
Old 20th May 2011, 07:06   #3
mhatreakshay
Junior Member
 
Join Date: Jan 2011
Posts: 8
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?
mhatreakshay is offline   Reply With Quote
Old 20th May 2011, 08:01   #4
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Yes, it can. Using the AccessControl plugin.

NSIS doesn't do anything automatically. You must tell it what to do.
MSG is offline   Reply With Quote
Old 20th May 2011, 10:29   #5
mhatreakshay
Junior Member
 
Join Date: Jan 2011
Posts: 8
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.
mhatreakshay is offline   Reply With Quote
Old 20th May 2011, 18:56   #6
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
I've no idea what you're trying to accomplish. Is there a specific question, in there?
MSG is offline   Reply With Quote
Old 23rd May 2011, 08:08   #7
mhatreakshay
Junior Member
 
Join Date: Jan 2011
Posts: 8
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.
mhatreakshay is offline   Reply With Quote
Old 23rd May 2011, 11:00   #8
mhatreakshay
Junior Member
 
Join Date: Jan 2011
Posts: 8
hey its leting the user access uninstall.exe since its been creating using . WriteUninstaller.
but other issues still persist.
mhatreakshay is offline   Reply With Quote
Old 24th May 2011, 09:14   #9
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 24th May 2011, 17:33   #10
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
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.
MSG is offline   Reply With Quote
Old 24th May 2011, 17:48   #11
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 24th May 2011, 20:12   #12
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Quote:
Originally Posted by Afrow UK View Post
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...

Quote:
Originally Posted by Afrow UK View Post
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.
MSG is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump