本文介绍了Wix:如何设置文件夹和所有子文件夹的权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道如何设置文件夹的权限:
I know how to set the permissions for a folder:
<DirectoryRef Id="ProgramFilesFolder"> <Directory Id="PHPFolder" Name="PHP"> <Component Id="PHP_comp" DiskId="1" Guid="*"> <CreateFolder> <Permission User="Everyone" GenericAll="yes" /> </CreateFolder>但是,我还需要将权限应用于所有子文件夹.列出所有文件夹是否可能?
However I need the permissions to be applied to all subfolders as well. Is this possible with out listing all the folders?
推荐答案首先,我建议您使用 PermissionEx 代替.它是标准的WiX扩展,与Permission相比,它具有一个非常巨大的优势-它不会覆盖,但会修改ACL.并且默认情况下,它将对文件夹及其所有后代文件和文件夹应用权限,因此您无需指定其他任何内容.
First of all, I would recommend you using PermissionEx instead. It is a standard WiX extension and it has one really huge advantage over Permission - it doesn't overwrite, but modifies ACLs. And by default, it applies permissions to the folder and all its descendant files and folders, so you don't have to specify anything extra.
希望这会有所帮助.
更多推荐
Wix:如何设置文件夹和所有子文件夹的权限
发布评论