Old 20th August 2009, 09:19   #1
Nizar
Junior Member
 
Join Date: Aug 2009
Location: Amman, Jordan
Posts: 2
Vista "program files" sub directory permissions

Hello all,
Recently i had a problem, Trying to install my own software under "Program files\mysoftware" and create sub folders and files, I'm trying to grant full access to these files and folders to the ordinary vista user account.

Here is a snapshot on what i did:

RequestExecutionLevel user

GetFunctionAddress $0 GrantFullAccess
UAC::ExecCodeSegment $0


Function GrantFullAccess
AccessControl::GrantOnFile "$PROGRAMFILES\MySoftware\data\*.*" "(BU)" "FullAccess"
AccessControl::GrantOnFile "$DOCUMENTS\MySoftware\*.*" "(BU)" "FullAccess"
AccessControl::GrantOnFile "$PROFILE\.MySoftware\*.*" "(BU)" "FullAccess"
FunctionEnd



Now, when installing the software, and see the permission for the users, the logged in user don't have full access to the folders inside "program files".


Please help,

THanks
Nizar is offline   Reply With Quote
Old 20th August 2009, 14:04   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
Why are you using the UAC plugin here? UAC::ExecCodeSegment will cause that function to NOT run as admin.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 20th August 2009, 14:25   #3
Nizar
Junior Member
 
Join Date: Aug 2009
Location: Amman, Jordan
Posts: 2
I don't know

Hello Andres
Actually I'm new to NSIS, I found an example, or to be more specific, i collected the script from snippets from the web.
Can you please tell me what should i do?

Thanks in advance
Nizar is offline   Reply With Quote
Old 20th August 2009, 19:46   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
Just don't use the UAC plugin. Put the AccessControl calls in a normal section

IntOp $PostCount $PostCount + 1
Anders 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