Access Control Issue

Got a problem you cannot solve? Try here.
Post Reply
Gareth Owen
Posts: 149
Joined: Fri Oct 21, 2005 8:42 am
Location: UK

Access Control Issue

Post by Gareth Owen »

I have just tried using the access control feature in IAS, The object here, to make things simple is to give everyone full control on the $TARGETDIR$ and everything within it.

I tried to add this, but you could not select a directory using the GUI, so I typed it in.

This did seem to work, but when I installed the application, The TARGETDIR directory did have all users full control, but all items below this had absolutely no permissions. this means that you cannot run the application.

How should this operate?

What we actually need is that all users should be able to modify/delete/add a few files, in the TARGETDIR and one of the subdirectories.

Cheers
sinan
Site Admin
Posts: 1037
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Post by sinan »

What you can do is pre-create the folder using the Call DLL Function plug-in command, and tapping into the CreateDirectoryA Win32 API in kernel32.dll. Just pass $TARGETDIR$ as the folder parameter and null as the second parameter. And then set the access control in the next line of your script. Be sure to do this all before you call Apply Install.

This way the folder will be pre-created, and access set; and then when Windows Installer copies files into that folder, they will inherit the parent permissions (and hence, access rights).
Gareth Owen
Posts: 149
Joined: Fri Oct 21, 2005 8:42 am
Location: UK

Post by Gareth Owen »

Thanks, will try this
IanM
Posts: 42
Joined: Tue Mar 08, 2005 1:23 pm

Post by IanM »

sinan wrote: This way the folder will be pre-created, and access set; and then when Windows Installer copies files into that folder, they will inherit the parent permissions (and hence, access rights).
Hi Sinan,

Will the permissions on sub-folders within the Targetdir folder created this way, also inherit the parent permissions recursively?

Ian
sinan
Site Admin
Posts: 1037
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Post by sinan »

Yes, they will.

There is also an issue I want to highlight. Sometimes the properties window for a file or folder will not update to display the latest (and revised) access permissions. We ran into this problem during our testing. So always be sure to test the actual application...
semike
Posts: 17
Joined: Wed Jan 09, 2008 3:16 am

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 Expres Edition correctly?

Thank you in advance
Michael
Post Reply