Page 1 of 1
Access Control Issue
Posted: Thu Nov 03, 2005 10:44 am
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
Posted: Fri Nov 04, 2005 1:51 am
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).
Posted: Fri Nov 04, 2005 2:46 am
by Gareth Owen
Thanks, will try this
Posted: Sat Nov 05, 2005 5:47 am
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
Posted: Sat Nov 05, 2005 10:27 am
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...
Posted: Mon Jan 14, 2008 8:46 am
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