Restrict access to a folder installed using wix installer

爷,独闯天下 提交于 2019-12-24 03:17:01

问题


My use case is to run a msi package which creates a folder, in addition to doing other things, which should be accessible only to the Administrators. I tried using the util:PermissionEx element but the wix page for the PermissionEx element doesn’t really tell about what do different attributes do. I tried various things, one eg below, but I was still able to access the created folder from both administrator and a non-admin user account.

<Directory Id=“TmpDir” Name=“TmpDir”>

<Component Id="CreateDir" Guid=“<>">

    <CreateFolder>

      <util:PermissionEx User="Users" Read="no" GenericRead="no”/> <!— Tried different combinations here —>

    </CreateFolder>

  </Component>

  </Directory>

Any help as to what should I do to achieve what I have stated above. Let me know if my question is unclear and I can explain in a more detail or in a different way. Also the Package has

InstallScope="perMachine"
InstallPrivileges="elevated"

来源:https://stackoverflow.com/questions/42152846/restrict-access-to-a-folder-installed-using-wix-installer

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!