Accessrights on destination folders on Windows Vista

Got a problem you cannot solve? Try here.
Post Reply
semike
Posts: 17
Joined: Wed Jan 09, 2008 3:16 am

Accessrights on destination folders on Windows Vista

Post by semike »

Hello,

I use the Codegear Express Edition of InstallAware 6 and try to set the permissions of a subdirectory $ALLAPPDATA$\\productname\\data to "grant everyone full control". But regardless of my settings (full control or read+write), the destination PC (Windows Vista with enabled UAC) will not set any permissions.

How can I use these permissions with my Express Edition correctly?

Thank you in advance
Michael
glenharvy
Posts: 167
Joined: Fri Sep 14, 2007 3:53 am

Post by glenharvy »

Same problem here - did you ever figure it out?
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Try it with new folders you create empty and it will work.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Frankk
Posts: 1
Joined: Thu Sep 10, 2009 12:57 pm

Post by Frankk »

I am using a trial version of InstallAware9 and am having the same problem (in Vista w/UAC) getting the built-in group "Users" to have RW rights to a folder below $ALLAPPDATA$\\productname\\data. I create new empty folders and I have tried every combination of granting full rights.

After the install when I check settings for "Users" in that folder they are RO.

This is a showstopper for us - can you elaborate on the correct set of steps?

I have tried changing the location in MSICode of the create and Grant Access rights statements but it has no effect.
rspag
Posts: 7
Joined: Wed Sep 02, 2009 5:15 am
Location: Italy

Post by rspag »

I used this after checking the SUCCESS variable:

Code: Select all

Run Program cmd.exe /C icacls $TARGETDIR$ /grant:r *S-1-1-0:(OI)(CI)F /t (WAIT)
cmd /C tells to cmd to execute the command in the string that follows and then to close the cmd window itself
icacls is a cmd command to modify premission to files and folders...
S-1-1-0 is the SID for Everyone (you can use even a User Name but you have to remove *)
(OI)(CI) is to set the access property to subfolders and files (inherit)
F is full access
for some doc just type icacls on a cmd window and you will find all the command line parameters you can use or follow this technet link
http://technet.microsoft.com/en-us/libr ... 10%29.aspx

However I think this only works if you're running the setup as an admin...

PS: If your TARGETDIR contains spaces you have to use "$TARGETDIR$" or convert TARGETDIR in 8.3 format... I used:

Code: Select all

Set Variable TARGETSHORT to $TARGETDIR$
Convert to Short Path: TARGETSHORT
Run Program cmd.exe /C icacls $TARGETSHORT$ /grant:r *S-1-1-0:(OI)(CI)F /t (WAIT)
to avoid any problems with spaces and quotes :D

EDIT: I used this method cause the set access control of IA 9 wasn't working on Program Files or Program Files (x86) subfolders for me...

EDIT 2: I found icacls is only available on vista, seven and server 2003/2008, on Xp and earlier you have to use cacls instead, with some differences on command line parameters to use...
Post Reply