I\'ve read all related topics and haven\'t found a full answer to my problem.
I would like to give full permissions to SYSTEM and Read & Execute permissions to U
you need to implement deferred custom action for changing permissions. c# custom action example:
[CustomAction]
public static ActionResult SetFolderPermission(Session session)
{
string folder = session.CustomActionData["Folder"].Trim('\"');
string sid = session.CustomActionData["SID"].Trim('\"');
System.Security.Principal.SecurityIdentifier sidID = new System.Security.Principal.SecurityIdentifier(sid);
System.Security.AccessControl.DirectorySecurity ds = System.IO.Directory.GetAccessControl(folder);
ds.AddAccessRule(new System.Security.AccessControl.FileSystemAccessRule(sidID
, System.Security.AccessControl.FileSystemRights.Write
, System.Security.AccessControl.InheritanceFlags.ObjectInherit
, System.Security.AccessControl.PropagationFlags.NoPropagateInherit
, System.Security.AccessControl.AccessControlType.Allow));
System.IO.Directory.SetAccessControl(folder , ds);
return ActionResult.Success;
}
you may port that on C++, custom action must be deferred - than you must access your session properties by CustomActionData