Set Access Control not inheriting

Got a problem you cannot solve? Try here.
Aaron Young
Posts: 31
Joined: Wed Nov 16, 2005 12:54 pm

Set Access Control not inheriting

Postby Aaron Young » Fri Jul 25, 2008 9:50 am

I'm trying to create a folder in the $ALLAPPDATA$ path that gives Everyone full access. After searching the forums I found several entries that said use the CreateDirectoryA Win32 API with the Call DLL plug-in, so I did.

However, the problem seems to be that the permissions set using Set Access Control are not being inherited.

I've added the following MSI Code before Apply Install:

Code: Select all

~Set Access Control~
~{1F8C9992-38EF-4EA3-8666-D75F9EE429AE}~
~$ALLAPPDATA$Some Folder~
~FALSE~
~FALSE~
~FALSE~
~FALSE~
~~
~FALSE~
~FALSE~
~FALSE~
~FALSE~
~TRUE~
~TRUE~
~FALSE~
~FALSE~
~FALSE~
~FALSE~
~Call DLL Function~
~{B438CB66-A6CA-4621-BC04-18F4168EA5AC}~
~kernel32.dll,CreateDirectoryA,void,,"pointer to string","$ALLAPPDATA$\\Some Folder","double word",0,$~
~mIDEFunc.dll\\mEXEFunc.dll~


The folder is being created and it's permissions are being set to give "Everyone" full control, however the subfolders and files are not inheriting this.

I have to say that from all the posts I've seen on the subject it would seem this is a problem area for IA that should get careful consideration in an upcoming release. InstallShield handled permissions very cleanly, allowing you to set them directly on Files/Folders being installed.

Regards,

- Aaron.

Aaron Young
Posts: 31
Joined: Wed Nov 16, 2005 12:54 pm

Postby Aaron Young » Fri Jul 25, 2008 10:04 am

Interesting Addendum:

I've been doing some experimentation and I've found that if I don't select Grant Everyone Total Control and instead select Set Chosen Users With Access Rights and then check Everyone, Current User and Authenticated User under User Accounts/Groups and check Read and Write Access Rights, then I get the originally expected functionality and it's inherited correctly.

When I switch back to Grant Everyone Total Control I get slightly different results to my first attempt, this time, the folder and sub folders have "Everyone" with "Full Control", but the files in those folders do not.

This experiment was performed on Windows XP Pro SP2.

- Aaron.


Return to “Technical Support”

Who is online

Users browsing this forum: Baidu [Spider] and 38 guests