我跟着SOlink https://stackoverflow.com/questions/4272406/wix-how-to-set-permissions-for-folder-and-all-sub-folders为文件夹添加权限。但是如果我想设置目录的权限,我该怎么办?
例如,在链接中有以下代码:
<DirectoryRef Id="ProgramFilesFolder">
<Directory Id="PHPFolder" Name="PHP">
<Component Id="PHP_comp" DiskId="1" Guid="*">
<CreateFolder>
<Permission User="Everyone" GenericAll="yes" />
</CreateFolder>
如何设置 PHPFolder 目录的权限?
也许尝试使用创建文件夹元素 http://wixtoolset.org/documentation/manual/v3/xsd/wix/createfolder.html:
<Directory Id="INSTALLFOLDER" Name="Myfolder">
<Component Feature="ProductFeature">
<File Source="TestFile.exe" />
<CreateFolder>
<Permission User="Everyone" GenericAll="yes"/>
</CreateFolder>
</Component>
</Directory>
一般提示: 尝试掠夺github.com https://www.github.com当你遇到困难时查看片段。随机抽样 https://github.com/aerobase/omnibus-aerobase-server/blob/ccbfb0a1b1d028fc2a5a350731a2b2a01f3c5325/resources/aerobase/msi/source.wxs.erb.
更多链接:
- WiX中申请权限的几种方法(中页) https://stackoverflow.com/questions/49324552/is-wix-changing-the-permissions-on-my-notes-ini-file/49325684#49325684
- 如何使用 wix 安装程序拒绝用户的文件夹权限 https://stackoverflow.com/questions/49543312/how-to-deny-folder-permission-to-users-with-wix-installer/49546999#49546999
- 在程序文件下运行 .exe 时出现 System.UnauthorizedAccessException https://stackoverflow.com/questions/50587622/system-unauthorizedaccessexception-while-running-exe-under-program-files/50588465#50588465
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)