在应用程序安装过程中设置具有继承的目录权限?
I found a thread on the Microsoft Forums where the answer tells how to set directory permissions using the LockPermission table. I tried it, but it doesn't seem to set the inheritance for any of the subdirectories. I need to be able to set the permissions for a particular folder that I create and have those permissions be inherited by all of the files and directories within and beneath it. Is there a way to do this without having to add a line in the LockPermission table for each and every directory (and file) that I want to affect?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于任何想要了解使用 MsiLockPermissionsEx 的乐趣和痛苦的人,这里有一个教程、一些最佳实践和一个帮助程序脚本。帮助程序脚本从现有系统资源中提取 SDDL - 因此您只需使用 Regedit 和 Windows 资源管理器来设置权限,帮助程序脚本就会为您提取它们。
本文还讨论了使用单个程序包支持 XP 和 Windows 7 权限的挑战。
您可以在这里查看:http://csi-windows.com/toolkit/csigetsddlfromobject
For anyone looking to know the joys and pains of using MsiLockPermissionsEx, here is a tutorial, some best practices and a helper script. The helper script extracts SDDL from existing system resources - so you just use Regedit and Windows Explorer to set permissions and the helper script extracts them for you.
The article also discusses the challenge of supporting XP and Windows 7 permissions with a single package.
You can check it out here: http://csi-windows.com/toolkit/csigetsddlfromobject
您可以查看 MSI 5 中的 MsiLockPermissionsEx 支持是否可以处理此问题(并且是您可以接受的依赖项,因为目前它仅在 Windows 7 上可用),或者您可以实现自定义支持。 Windows Installer 早期版本中提供的 LockPermissions 支持具有您所描述的(和其他)限制。
You can either see if the MsiLockPermissionsEx support in MSI 5 handles this (and is an acceptable dependency for you as currently it's only available on Windows 7), or you can implement custom support. The LockPermissions support available in earlier versions of Windows Installer has the limitation you describe (and others).