How to set permissions for directory

2019-07-28 10:17发布

I followed the SO link to add permission to a folder. However if I would like to set permission for directory, what can I do?

For example, in the link it has the following code:

<DirectoryRef Id="ProgramFilesFolder">
  <Directory Id="PHPFolder" Name="PHP">
    <Component Id="PHP_comp" DiskId="1" Guid="*">
      <CreateFolder>
        <Permission User="Everyone" GenericAll="yes" />
      </CreateFolder>

How can I set permission for directory PHPFolder?

1条回答
姐就是有狂的资本
2楼-- · 2019-07-28 11:02

Maybe try with a CreateFolder Element:

<Directory Id="INSTALLFOLDER" Name="Myfolder">
 <Component Feature="ProductFeature">
   <File Source="TestFile.exe" />
   <CreateFolder>
     <Permission User="Everyone" GenericAll="yes"/>
   </CreateFolder>
  </Component>
</Directory>

General Tip: Try to pillage github.com for snippets when you are stuck. Random Sample.


Further Links:

查看更多
登录 后发表回答